Write and read Metadata from a .tflite exported model. For details, see Adding metadata to TensorFlow Lite models
To run from command line, use the following command:
python -m mlcore.tensorflow.tflite_metadata [parameters]
The following parameters are supported:
model
: The path to the Tensorflow Lite exported model file. (e.g.: datasets/image_object_detection/car_damage/model.tflite)--source
: The path to the folder containing the SavedModel. (e.g.: datasets/image_object_detection/car_damage/saved_model)--categories
: The categories file to add to the Tensorflow Lite model. (e.g.: datasets/image_object_detection/car_damage/categories.txt)--name
: The name of the model. (e.g.: "SSD MobileNetV2")--version
: The version of the model, default to 1 (=v1)--type
: The type of the model, if not explicitly set try to infer from categories file path.
For reading metadata from a Tensorflow Lite model, set the model
parameter. For writing metadata to a Tensorflow Lite model, add corresponding additional parameters (e.g. --source, --categories).