TensorFlow Lite Object Detection - Not possible to add a new model

Hello!

I checked your real time object detection app which works fine with the initial models (MobileNet V1, EfficientNet Lite0, EfficientNet Lite1, EfficientNet Lite2). examples/lite/examples/object_detection/android at master · tensorflow/examples · GitHub

But I receive errors when I try to add other model for example yolo5s model trained on COCO dataset which converted from pt format to tflite with export.py script yolov5/export.py at master · ultralytics/yolov5 · GitHub

Below are the converted models for yolo5s (fp16 and int8 options) and I already checked they are working fine with detect.py.

I don’t understand why it is not possible to deploy/integrate other models in your real time object detection app, I am sure other users would like to use/add other models also except those initial 4 models mentioned above. Please can you check if you can deploy in your object detection app one of those two models (fp16 or int8) I shared with you above. I hope you can advice me how to fix the issue.

Look forward to hearing from you and thank you in advance!

@Hripsime_Snkhchyan,

Welcome to the Tensorflow Forum!

Currently we have the option to use one of the following pre-trained models:

The ObjectDetector API expects a TFLite model with mandatory TFLite Model Metadata. See examples of creating metadata for object detectors using the TensorFlow Lite Metadata Writer API.

How are you deploying your model to an Android app?

Thank you!

@chunduriv so there is no way to deply yolo5s model in TensorFlow Lite Object Detection app? If not, do you know by chance other possible real time object detection app where is possible deploy yolo models?
Yes I am using Android app and Android studio to launch TensorFlow Lite Object Detection app.

@Hripsime_Snkhchyan,

You can follow this article can be helpful. Thank you!