YOLOv5 TFLite real-time test code for i.MX 8M Plus EVK (TIM-VX)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

YOLOv5 TFLite real-time test code for i.MX 8M Plus EVK (TIM-VX)

854 Views
sunghyun96
Contributor I

https://github.com/ultralytics/yolov5/releases/tag/v7.0

I downloaded the pre-trained model from the link above and obtained yolov5n.pt, then exported it to a TFLite model using the following command:

      python export.py --weights yolov5n.pt --imgsz 416 --include tflite --int8 

 

After that, I wrote code for real-time inference on the i.MX 8M PLUS EVK board by referring to Ultralytics' detection.py.

The problem is that YOLOv4-tiny (416x416) produced at least 10 fps regardless of resolution, but YOLOv5 (416 x 416) gives only about 2-3 fps starting from 320x240.

So I looked for example code in the NXP community, and it seems possible to request a test code.

Could I receive a test code? 

0 Kudos
Reply
1 Reply

781 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi  Sunghyun96

 

I would suggest you refer to the yolov5 benchmark test code,

 

Regards

Daniel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2192263%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EYOLOv5%20TFLite%20real-time%20test%20code%20for%20i.MX%208M%20Plus%20EVK%20(TIM-VX)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2192263%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fultralytics%2Fyolov5%2Freleases%2Ftag%2Fv7.0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fultralytics%2Fyolov5%2Freleases%2Ftag%2Fv7.0%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20downloaded%20the%20pre-trained%20model%20from%20the%20link%20above%20and%20obtained%20yolov5n.pt%2C%20then%20exported%20it%20to%20a%20TFLite%20model%20using%20the%20following%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20python%20export.py%20--weights%20yolov5n.pt%20--imgsz%20416%20--include%20tflite%20--int8%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAfter%20that%2C%20I%20wrote%20code%20for%20real-time%20inference%20on%20the%20i.MX%208M%20PLUS%20EVK%20board%20by%20referring%20to%20Ultralytics'%20detection.py.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20problem%20is%20that%20YOLOv4-tiny%20(416x416)%20produced%20at%20least%2010%20fps%20regardless%20of%20resolution%2C%20but%20YOLOv5%20(416%20x%20416)%20gives%20only%20about%202-3%20fps%20starting%20from%20320x240.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20I%20looked%20for%20example%20code%20in%20the%20NXP%20community%2C%20and%20it%20seems%20possible%20to%20request%20a%20test%20code.%3CBR%20%2F%3E%3CBR%20%2F%3ECould%20I%20receive%20a%20test%20code%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20YOLOv5%20TFLite%20real-time%20test%20code%20for%20i.MX%208M%20Plus%20EVK%20(TIM-VX)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%20Sunghyun96%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20would%20suggest%20you%20refer%20to%20the%20yolov5%20benchmark%20test%20code%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E