NPU bad detection with Yolov5 - i.MX8MP

cancel
Showing results for 
Search instead for 
Did you mean: 

NPU bad detection with Yolov5 - i.MX8MP

Jump to solution
1,408 Views
simoberny
Contributor II

Hi, 

I'm quite struggling for some time now trying to get NPU detection to work with a C++ program. The same code on the CPU gets optimal results, but using VX delegate the detections are completely wrong. The code seems to run smoothly and inference shows good timing (yolov5s model with 448x448 input ~ 70ms). 

Right now I'm trying with Yolov5 (uint8 quantized), but I have tried with different pre-trained models obtaining the same behavior, good detection on CPU, and random detection on NPU. 

To obtain the model I used the export from yolov5 repo: 

 python export.py --weights yolov5s.pt  --imgsz 448 --include tflite --int8

I've also tried TFlite hub models like SSD and mobilenet, that have already been converted to uint8. 

 

In the attachment the piece of code I am using for the inference and the converted yolov5n model. 

What could it be the cause? 

 

Thanks,

Best regards

0 Kudos
1 Solution
1,279 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

 

At least, You have to change to 5.15.71 BSP.

Regards

View solution in original post

21 Replies
1,103 Views
simoberny
Contributor II

Unfortunately, this is not an option for me since I'm using a Basler camera and for that BSP version, there is still no driver available. Actually with the Variscite board, right now, the BSP is only up to 5.15.60. 

Could I ask what's the difference in the 5.15.70 version, that enables the use of NPU with Yolo models? 

I will try in the future, but for now, I'm forced to use the CPU with a smaller model to have a decent time.

Thank you, 

Best regards 

 

 

0 Kudos