Skip to content
Branch: master
Find file History

Latest commit

ziyeqinghan and Copybara-Service Add metadata in image classification colab.
PiperOrigin-RevId: 304582910
Latest commit 70be2b2 Apr 3, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
cli Add EfficientNet-lite models and set EfficientNet-Lite0 as the defaul… Mar 6, 2020
core Fix saved model conversion failure Apr 2, 2020
demo Add metadata in image classification colab. Apr 3, 2020 Fix typos for model maker Mar 17, 2020 Change names. Feb 28, 2020
requirements.txt tensorflow-hub 0.8.0 has been released; let ModelMaker use it (or lat… Apr 2, 2020

TFLite Model Maker


The TFLite Model Maker library simplifies the process of adapting and converting a TensorFlow neural-network model to particular input data when deploying this model for on-device ML applications.


  • Refer to requirements.txt for dependent libraries that're needed to use the library and run the demo code.


Two alternative methods to install Model Maker library with its dependencies.

  • Install directly.
pip install git+[model_maker]
  • Clone the repo from the HEAD, and then install with pip.
git clone
cd examples
pip install .[model_maker]

End-to-End Example

For instance, it could have an end-to-end image classification example that utilizes this library with just 4 lines of code, each of which representing one step of the overall process:

  1. Load input data specific to an on-device ML app.
data = ImageClassifierDataLoader.from_folder('flower_photos/')
  1. Customize the TensorFlow model.
model = image_classifier.create(data)
  1. Evaluate the model.
loss, accuracy = model.evaluate()
  1. Export to Tensorflow Lite model.
model.export('flower_classifier.tflite', 'flower_label.txt')


Currently, we support image classification and text classification tasks and provide demo code and colab for each of them in demo folder.

You can’t perform that action at this time.