Skip to content

I can't convert to tflite file #1

@karry-zhuang

Description

@karry-zhuang

I ran into a problem at this point. I put this code into the programmer and the programmer told me "
ModuleNotFoundError: No module named 'onnx2tf'"

Export yolov8n object detection pytorch model to int8 tflite
After training process is done, then you will get the which is the pytorch model.best.pt
Use python code to export it to int8 tflite (full interger quant) by Ultralytics export API
If your training dataset is another, you should change the data yaml file.
from ultralytics import YOLO

# Load a model

image_size = 192

model = YOLO("best.pt")

model.export(format="tflite", imgsz = image_size, int8 = True, data="SKU-110K.yaml")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions