This is achieved by the TFLite Support Codegen tool, where users can get the model interface (contains ready-to-use APIs) simply by passing the model to the codegen tool. The automatic codegen strategy is designed based on the TFLite metadata.
Provide optimized model interface for popular ML tasks.
The model interfaces provided by the TFLite Support Task Library are specifically optimized compared to the codegen version in terms of both usability and performance. Users can also swap their own custom models with the default models in each task.
Provide the flexibility to customize model interface and build inference pipelines.
The TFLite Support Util Library contains varieties of util methods and data structures to perform pre/post processing and data conversion. It is also designed to match the behavior of TensorFlow modules, such as TF.Image and TF.text, ensuring consistency from training to inferencing.
See the documentation on tensorflow.org for more instruction and examples.
We use Bazel to build the project. When you're building the Java (Android) Utils, you need to set up following env variables correctly:
Let us know what you think about TFLite Support by creating a new Github issue, or email us at firstname.lastname@example.org.