LiteRT is available in Google Play services runtime for all Android devices running the current version of Play services. This runtime allows you to run machine learning (ML) models without statically bundling LiteRT libraries into your app.
With the Google Play services API, you can reduce the size of your apps and gain improved performance from the latest stable version of the libraries. TensorFlow Lite in Google Play services is the recommended way to use LiteRT on Android.
If you are already using standalone TensorFlow Lite in your app, refer to the Migrating from standalone LiteRT section to update an existing app to use the Play services runtime. For more information about Google Play services, see the Google Play services website.
Using the Play services runtime
The LiteRT in Google Play services is available through the following programming language apis:
Limitations
LiteRT in Google Play services has the following limitations:
- Support for hardware acceleration delegates is limited to the delegates listed in the Hardware acceleration section. No other acceleration delegates are supported.
- Experimental or deprecated LiteRT APIs, including custom ops, are not supported.
Support and feedback
You can provide feedback and get support through the TensorFlow Issue Tracker. Please report issues and support requests using the Issue template for LiteRT in Google Play services.
Terms of service
Use of LiteRT in Google Play services APIs is subject to the Google APIs Terms of Service.
Privacy and data collection
When you use LiteRT in Google Play services APIs, processing of the input data, such as images, video, text, fully happens on-device, and TensorFlow Lite in Google Play services APIs does not send that data to Google servers. As a result, you can use our APIs for processing data that should not leave the device.
The LiteRT in Google Play services APIs may contact Google servers from time to time in order to receive things like bug fixes, updated models and hardware accelerator compatibility information. The LiteRT in Google Play services APIs also sends metrics about the performance and utilization of the APIs in your app to Google. Google uses this metrics data to measure performance, debug, maintain and improve the APIs, and detect misuse or abuse, as further described in our Privacy Policy.
You are responsible for informing users of your app about Google's processing of LiteRT in Google Play services APIs metrics data as required by applicable law.
Data we collect includes the following:
- Device information (such as manufacturer, model, OS version and build) and available ML hardware accelerators (GPU and DSP). Used for diagnostics and usage analytics.
- Device identifier used for diagnostics and usage analytics.
- App information (package name, app version). Used for diagnostics and usage analytics.
- API configuration (such as which delegates are being used). Used for diagnostics and usage analytics.
- Event type (such as interpreter creation, inference). Used for diagnostics and usage analytics.
- Error codes. Used for diagnostics.
- Performance metrics. Used for diagnostics.