How to Integrate and run inference using Yolo v8 or v11 using NNStreamer Pipeline on i.MX95?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to Integrate and run inference using Yolo v8 or v11 using NNStreamer Pipeline on i.MX95?

2,299 次查看
vatsal
Contributor II

This is the sample pipeline for SSD Mobilenet V2. Now what are modifications required to execute yolov8 or yolov11 tflite quantized model on i.MX95 platform with NPU Acceleration?

gst-launch-1.0 v4l2src name=cam_src device=/dev/video3 num-buffers=-1 ! \
video/x-raw,width=640,height=480,framerate=30/1 ! tee name=t
t. ! queue name=thread-nn max-size-buffers=2 leaky=2 ! \
imxvideoconvert_g2d ! video/x-raw,width=300,height=300,format=RGBA ! \
videoconvert ! video/x-raw,format=RGB ! tensor_converter ! \
tensor_filter latency=1 framework=tensorflow-lite \
model=/opt/gopoint-apps/downloads/ssdlite_mobilenet_v2_coco_quant_uint8_float32_no_postprocess.tflite \
custom=Delegate:External,ExtDelegateLib:libvx_delegate.so name=detection_filter ! \
tensor_decoder mode=bounding_boxes option1=mobilenet-ssd \
option2=/opt/gopoint-apps/downloads/coco_labels_list.txt \
option3=/opt/gopoint-apps/downloads/box_priors.txt option4=640:480 option5=300:300 ! \
imxvideoconvert_g2d ! mix. \
t. ! queue name=thread-img max-size-buffers=2 leaky=2 ! \
imxcompositor_g2d name=mix sink_0::zorder=2 sink_1::zorder=1 latency=20000000 min-upstream-latency=20000000 ! \
cairooverlay name=perf ! \
fpsdisplaysink name=img_tensor text-overlay=false video-sink=waylandsink sync=false

0 项奖励
回复
3 回复数

2,238 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi,

Please refer nnstreamer yolov4 tiny script in Object Detection document

https://github.com/nxp-imx/nxp-nnstreamer-examples/tree/main/tasks/object-detection

Zhiming_Liu_0-1760403919196.png
Best Regards,
Zhiming

0 项奖励
回复

2,175 次查看
vatsal
Contributor II

Thanks for the quick reply @Zhiming_Liu .

As I already mentioned in the question and let me again ask, I have YOLOv8 and YOLOv11 model that I want to integrate with gstreamer pipeline.

What are steps required and where we need to make changes if you can suggest.

I have the i.MX95 hardware and I want to execute the quantized model with NPU acceleration.


Thanks,
Vatsal

0 项奖励
回复

1,942 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi,

The i.MX95 has not yet entered mass production, so there is currently no matching code available. We recommend referring to the relevant configurations for YOLOv4 or seeking support from the development board supplier.

Best Regards,
Zhiming

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2184590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E4%BD%95%E5%9C%A8%20i.MX95%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20nnStreamer%20Pipeline%20%E4%BD%BF%E7%94%A8%20Yolo%20v8%20%E6%88%96%20v11%20%E9%9B%86%E6%88%90%E5%92%8C%E8%BF%90%E8%A1%8C%E6%8E%A8%E7%90%86%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%BF%99%E6%98%AF%20SSD%20Mobilenet%20V2%20%E7%9A%84%E6%A0%B7%E6%9C%AC%E7%AE%A1%E9%81%93%E3%80%82%E7%8E%B0%E5%9C%A8%EF%BC%8C%E5%9C%A8%E5%B8%A6%E6%9C%89%20NPU%20%E5%8A%A0%E9%80%9F%E5%8A%9F%E8%83%BD%E7%9A%84%20i.MX95%20%E5%B9%B3%E5%8F%B0%E4%B8%8A%E6%89%A7%E8%A1%8C%20yolov8%20%E6%88%96%20yolov11%20tflite%20%E9%87%8F%E5%8C%96%E6%A8%A1%E5%9E%8B%E9%9C%80%E8%A6%81%E8%BF%9B%E8%A1%8C%E5%93%AA%E4%BA%9B%E4%BF%AE%E6%94%B9%EF%BC%9F%3C%2FP%3E%3CP%3Egst-%E7%94%A8%E4%B8%8A%E5%B8%82%EF%BC%8C%E4%B8%8D%E7%94%A8%E5%8F%91%E5%B8%83-1.0v4l2src%20name%3Dcam_src%20%E8%AE%BE%E5%A4%87%3D%2Fdev%2Fvideo3%20num-buffers%3D-1%EF%BC%81%5C%3CBR%20%2F%3Evideo%2Fx-raw%2Cwidth%3D640%2Cheight%3D480%2Cframerate%3D30%2F1%20%EF%BC%81tee%20name%3Dt%3CBR%20%2F%3Et.!queue%20name%3Dthread-nn%20max-size-buffers%3D2%20leaky%3D2%20%EF%BC%81%5C%3CBR%20%2F%3Eimxvideoconvert_g2d%20%EF%BC%81video%2Fx-raw%2Cwidth%3D300%2Cheight%3D300%2Cformat%3DRGBA%20%EF%BC%81%5C%3CBR%20%2F%3Evideoconvert%20%EF%BC%81video%2Fx-raw%2Cformat%3DRGB%20%EF%BC%81%E5%BC%A0%E9%87%8F%E8%BD%AC%E6%8D%A2%E5%99%A8%20%EF%BC%81%5C%3CBR%20%2F%3Etensor_filter%20latency%3D1%20framework%3Dtensorflow-lite%20%5C%3CBR%20%2F%3Emodel%3D%2Fopt%2Fgopoint-apps%2Fdownloads%2Fssdlite_mobilenet_v2_coco_quant_uint8_float32_noo_postprocess.tflite%20%5C%3CBR%20%2F%3Ecustom%3DDelegate%3AExternal%2CExtDelegateLib%3Alibvx_delegate.so%20name%3Ddetection_filter%20%EF%BC%81%5C%3CBR%20%2F%3Etensor_decoder%20mode%3Dbounding_boxes%20option1%3Dmobilenet-ssd%20%5C%3CBR%20%2F%3Eoption2%3D%2Fopt%2Fgopoint-apps%2Fdownloads%2Fcoco_labels_list.txt%20%5C%3CBR%20%2F%3Eoption3%3D%2Fopt%2Fgopoint-apps%2Fdownloads%2Fbox_priors.txt%20option4%3D640%3A480%20option5%3D300%3A300%20%EF%BC%81%5C%3CBR%20%2F%3Eimxvideoconvert_g2d%20%EF%BC%81%E6%B7%B7%E5%90%88%E3%80%82%5C%3CBR%20%2F%3Et.!queue%20name%3Dthread-img%20max-size-buffers%3D2%20leaky%3D2%20%EF%BC%81%5C%3CBR%20%2F%3Eimxcompositor_g2d%20name%3Dmix%20sink_0%3A%3Azorder%3D2%20sink_1%3A%3Azorder%3D1%20latency%3D20000000%20min-upstream-latency%3D20000000%20%EF%BC%81%5C%3CBR%20%2F%3Ecairooverlay%20name%3Dperf%20%EF%BC%81%5C%3CBR%20%2F%3Efpsdisplaysink%20name%3Dimg_tensor%20text-overlay%3Dfalse%20video-sink%3Dwaylandsink%20sync%3Dfalse%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2188878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20Integrate%20and%20run%20inference%20using%20Yolo%20v8%20or%20v11%20using%20NNStreamer%20Pipeline%20on%20i.MX95%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2188878%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3CBR%20%2F%3E%3CBR%20%2F%3Ei.MX95%20%E5%B0%9A%E6%9C%AA%E9%87%8F%E4%BA%A7%EF%BC%8C%E5%9B%A0%E6%AD%A4%E7%9B%AE%E5%89%8D%E6%B2%A1%E6%9C%89%E5%8C%B9%E9%85%8D%E7%9A%84%E4%BB%A3%E7%A0%81%E3%80%82%E6%88%91%E4%BB%AC%E5%BB%BA%E8%AE%AE%E5%8F%82%E8%80%83%20YOLOv4%20%E7%9A%84%E7%9B%B8%E5%85%B3%E9%85%8D%E7%BD%AE%E6%88%96%E5%AF%BB%E6%B1%82%E5%BC%80%E5%8F%91%E6%9D%BF%E4%BE%9B%E5%BA%94%E5%95%86%E7%9A%84%E6%94%AF%E6%8C%81%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%87%B4%E6%95%AC%EF%BC%8C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2185751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20Integrate%20and%20run%20inference%20using%20Yolo%20v8%20or%20v11%20using%20NNStreamer%20Pipeline%20on%20i.MX95%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2185751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%84%9F%E8%B0%A2%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F151788%22%20target%3D%22_blank%22%3E%40Zhiming_Liu%20%E7%9A%84%3C%2FA%3E%E5%BF%AB%E9%80%9F%E5%9B%9E%E5%A4%8D%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%AD%A3%E5%A6%82%E6%88%91%E5%9C%A8%E9%97%AE%E9%A2%98%E4%B8%AD%E5%B7%B2%E7%BB%8F%E6%8F%90%E5%88%B0%E7%9A%84%EF%BC%8C%E8%AE%A9%E6%88%91%E5%86%8D%E9%97%AE%E4%B8%80%E9%81%8D%EF%BC%8C%E6%88%91%E6%83%B3%E5%B0%86YoLov8%E5%92%8CYoLov11%E6%A8%A1%E5%9E%8B%E9%9B%86%E6%88%90%E5%88%B0gstreamer%E7%AE%A1%E9%81%93%E4%B8%AD%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%E9%9C%80%E8%A6%81%E9%87%87%E5%8F%96%E5%93%AA%E4%BA%9B%E6%AD%A5%E9%AA%A4%EF%BC%8C%E6%88%91%E4%BB%AC%E9%9C%80%E8%A6%81%E5%9C%A8%E5%93%AA%E4%BA%9B%E6%96%B9%E9%9D%A2%E5%81%9A%E5%87%BA%E6%94%B9%E5%8F%98%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%88%91%E6%9C%89%20i.MX95%20%E7%A1%AC%E4%BB%B6%EF%BC%8C%E6%83%B3%E7%94%A8%20NPU%20%E5%8A%A0%E9%80%9F%E6%89%A7%E8%A1%8C%E9%87%8F%E5%8C%96%E6%A8%A1%E5%9E%8B%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%B0%A2%E8%B0%A2%EF%BC%8C%3CBR%20%2F%3EVatsal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2185214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20Integrate%20and%20run%20inference%20using%20Yolo%20v8%20or%20v11%20using%20NNStreamer%20Pipeline%20on%20i.MX95%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2185214%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CBR%20%2F%3E%3CBR%20%2F%3E%EF%BC%8C%E8%AF%B7%E5%8F%82%E9%98%85%E5%AF%B9%E8%B1%A1%E6%A3%80%E6%B5%8B%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%20nnstreamer%20yolov4%20%E5%BE%AE%E5%9E%8B%E8%84%9A%E6%9C%AC%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fnxp-nnstreamer-examples%2Ftree%2Fmain%2Ftasks%2Fobject-detection%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fnxp-imx%2Fnxp-nnstreamer-examples%2Ftree%2Fmain%2Ftasks%2Fobject-detection%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zhiming_Liu_0-1760403919196.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Zhiming_Liu_0-1760403919196.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F360566iD8C1D72AFC00BA04%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zhiming_Liu_0-1760403919196.png%22%20alt%3D%22Zhiming_Liu_0-1760403919196.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%E8%87%B4%E6%95%AC%EF%BC%8C%3CBR%20%2F%3EZhiming%3C%2FP%3E%3C%2FLINGO-BODY%3E