ml-gde / e2e-tflite-tutorials

Project tracking of the "Mobile ML Working Group", for the End-to-End TensorFlow Lite tutorials.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSD MobileNetV2 e2e tutorial (with the latest TFOD API)

sayakpaul opened this issue · comments

@khanhlvg after I was able to successfully export the TFLite model I tried the inference pipeline. But I could not make sense of the interpreter outputs. The format of the TFOD API output and TFLite interpreter output differ. Could you provide me a reference here?

Here's the TFLite model for your reference:
pets_detector.tflite.zip

Here's my Colab Notebook.

commented

You can take a look at this object detection sample on how to use the model using Python API.

Trying to play with Object detection TF.2 I created a colab notebook to convert saved models from TensorFlow v.2 model zoo to .tflite.
Apparently despite it is stated that SSD models can be converted I have not managed to succeed in that!

Any thoughts why this conversion of the specific ready saved models does not proceed?

@farmaker47 in order to be able to convert the graph to TFLite the graph needs to be compatible with the converter. Please either follow the Colab Notebook I mentioned or follow the commands mentioned here.

FWIW, I was able to complete the following workflow -

  • Train an SSD MobileNetV2 on the pets dataset using Cloud TPUs.
  • Export a TFLite compatible graph from the fine-tuned checkpoints using the latest exporter script.
  • Convert to TFLite and run inference.

Here's my repository - https://github.com/sayakpaul/E2E-Object-Detection-in-TFLite.