1840213_en-US

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

1840213_en-US

1840213_en-US

Use NPU with yolov5 on iMX8MP

I am trying to run yolov5 on Verdin iMX8M Plus SOM. I have connected a USB webcam to the Yavia Development Board.

It is running only on the CPU I have the NPU enabled and I am running on 5.15

The yolov5 logs output is

# python3 detect.py --source 2

detect: weights=yolov5s.pt, source=2, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1

YOLOv5  v7.0-295-gac6c4383 Python-3.10.13 torch-2.2.2 CPU



Fusing layers... 

YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs

[ WARN:[email protected]] global /usr/src/debug/opencv/4.6.0.imx-r0/git/modules/videoio/src/cap_gstreamer.cpp (1405) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

1/1: 2...  Success (inf frames 640x480 at 30.00 FPS)



[ WARN:[email protected]] global /usr/src/debug/opencv/4.6.0.imx-r0/git/modules/videoio/src/cap_gstreamer.cpp (2180) open OpenCV | GStreamer warning: cannot link elements

0: 480x640 1 person, 2571.6ms

0: 480x640 2 persons, 1 cell phone, 2471.2ms

0: 480x640 1 person, 2592.1ms

0: 480x640 1 person, 2523.1ms

0: 480x640 1 person, 2413.3ms

0: 480x640 1 person, 2483.8ms

0: 480x640 1 person, 2499.5ms

Any pointers on how can I get the NPU detected.

Thanks and Regards


i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlusRe: Use NPU with yolov5 on iMX8MP

Hello! @Kianou 


Sure, please take a look to the updated link:

https://www.nxp.com/docs/en/user-guide/UG10166.pdf


Best regards,

Salas.

Re: Use NPU with yolov5 on iMX8MP

Hi, Manuel_Salas

I found  IMX-MACHINE-LEARNING-UG  is not foud now.  Is it still availble?

Best Regards,

kian

Re: Use NPU with yolov5 on iMX8MP

Hi!
Sorry for the delay in response. I checked the hardware acceleration section of iMX machine learning users guide.

I looked at the examples in /usr/bin/tensorflow-lite-2.10.0/examples/ and is working on the NPU.

How can I get yolov5 to detect the NPU?

Also are there any examples which use realtime camera feed or how can I edit the existing ones to use a camera?

Re: Use NPU with yolov5 on iMX8MP

Hello @kanakshilledar 


You can check the IMX-MACHINE-LEARNING-UG in section 7.1 Hardware acceleration on i.MX 8 Series.


Best regards.


Salas.

Tags (1)
No ratings
Version history
Last update:
13 hours ago
Updated by: