0

when i convert my trained yolov5 custom model best.pt to best-fp16.tflite with the commande : !python yolov5/export.py --weights best.pt --include tflite .I got my converted weights with no issue However, when I ran detection with my best-fp16.tflite : !python yolov5/detect.py --weights best-fp16.tflite --source images.jpg . the detection works but the classe names are wrong.

Thanks.

wrong classe names

1

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36

1 Answers1

0

The model is still using the labels it was pretrained on (the benchmark labels) so to properly execute this command, make sure to include the argument --data data.yaml it should look like this:

!python yolov5/detect.py --weights best-fp16.tflite --data data.yaml --source images.jpg

The data.yaml file should contain the information about your dataset classes.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 17 '23 at 02:39