ml-gde / e2e-tflite-tutorials

Project tracking of the "Mobile ML Working Group", for the End-to-End TensorFlow Lite tutorials.
Apache License 2.0
133 stars 26 forks source link

SSD MobileNetV2 e2e tutorial (with the latest TFOD API) #7

Closed sayakpaul closed 4 years ago

sayakpaul commented 4 years ago

Contributors: @khanhlvg, @sayakpaul

Repository: https://github.com/sayakpaul/E2E-Object-Detection-in-TFLite.

sayakpaul commented 4 years ago

@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.

khanhlvg commented 4 years ago

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

farmaker47 commented 4 years ago

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?

sayakpaul commented 4 years ago

@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.

sayakpaul commented 4 years ago

FWIW, I was able to complete the following workflow -

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