machine-learningbounding-boxyolov5tflite

Convert YoloV8 to Tflite


I have trained a custom model using Yolov8. I want to implement this model in my flutter app through the "google_mlkit_object_detection: ^0.6.0" package, for that I must convert it to tflite. But when I run

!yolo export model=best.pt format=tflite

I get "NotImplementedError: YOLOv8 TensorFlow export support is still under development."

But I have seen posts like the one bellow, of people who managed to convert

Interpreting YOLOv8->TFlite output

I can convert to onnx though, is it easier to convert from onnx to tflite?


Solution

  • I suspect you have an old version of the ultralytics package. Update it by:

    pip install --upgrade ultralytics
    

    and try again. TFLite exports are available in master as can be seen here: https://github.com/ultralytics/ultralytics/blob/4198570a4ba98351107527142d85125eb8d0039f/ultralytics/yolo/engine/exporter.py#L504-L548