For those who want use your own yolo model with pi5

Here I write a tutorial for you guys.

7 Likes

troubleshootingļ¼šCHECK failed - HEF file length does not match (status = 26)ļ¼Œ that because your host HailoData Compiler is not suitable with Pi5 HialoRT.

And when you meet error like can not find dateset please check hailo_model_zoo/docs/DATA.rst at master Ā· hailo-ai/hailo_model_zoo Ā· GitHub to install dataset and copy dataset to the folder, if the folder is not exit please make one.

Some time you will find error like no alls, just do like this:

git clone https://github.com/hailo-ai/hailo_model_zoo/tree/master
cd hailo_model_zoo

Then copy hailo_model_zoo floder to the error folder

1 Like

I tried to use the tutorial. Instead of yolo8, i changed the lines to ā€œyolo5ā€ (I dont know if I can do this or not). then after going forward line by line according to the tutorial, when do " ```
bash run.sh object-detection-hailo


gst_parse_error: no element "hailonet" (1)
hailomuxer name=hmux filesrc location=./video/detection0.mp4 name=src_0 ! queue name=queue_dec264 max-size-buffers=3 max-size-bytes=0 max-size-time=0 !  qtdemux ! h264parse ! avdec_h264 max-threads=2 !  video/x-raw,format=I420 ! queue name=queue_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 !  videoscale n-threads=2 ! queue name=queue_src_convert max-size-buffers=3 max-size-bytes=0 max-size-time=0 !  videoconvert n-threads=3 name=src_convert

Can you please help me with this error?

Hey @jiahao.li even though some issues are being reported on the tutorial, I want to thank you very much for putting this information out there. You are helping the community greatly with this content.

2 Likes

Input this command and show me result

hailortcli fw-control identify

and

lspci | grep Hailo

narges@raspberrypi:~ $ hailortcli fw-control identify
[HailoRT] [warning] Unsupported firmware operation. Host: 4.18.0, Device: 4.17.0
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.17.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB242602014
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP

narges@raspberrypi:~ $ lspci | grep Hailo
0000:01:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)
narges@raspberrypi:~ $

I still get this error with hailonet.


make sure hailort and DFC is suitableļ¼Œ and follow my tutorialļ¼š

2 Likes

It worked for me, but by using the provided models like yolov8n. Can you please let me know if it also works for yolov5 or not? i tried to use my yolov5 model, it didnt work.

The versions are now the ones its is mentioned in the image. When i used a provided model yolov8s, the codes runs successfully and detects the objects. But when i want to use my own model (yolov8n), i get this error. This is the information of both models. can you please help me with this error?:

(Hailo Detection App:11409): GStreamer-Base-CRITICAL **: 19:45:39.645: gst_queue_array_push_tail: assertion ā€˜array != NULLā€™ failed

narges@raspberrypi:~/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L $ hailo parse-hef ./hailomodel/yolov8n.hef
(hailo) Running command ā€˜parse-hefā€™ with ā€˜hailortcliā€™
Architecture HEF was compiled for: HAILO8L
Network group name: yolov8n, Multi Context - Number of contexts: 4
Network name: yolov8n/yolov8n
VStream infos:
Input yolov8n/input_layer1 UINT8, NHWC(640x640x3)
Output yolov8n/conv41 UINT8, FCR(80x80x64)
Output yolov8n/conv42 UINT8, NHWC(80x80x1)
Output yolov8n/conv52 UINT8, FCR(40x40x64)
Output yolov8n/conv53 UINT8, NHWC(40x40x1)
Output yolov8n/conv62 UINT8, FCR(20x20x64)
Output yolov8n/conv63 UINT8, FCR(20x20x1)

narges@raspberrypi:~/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L $ hailo parse-hef ./hailomodel/yolov8s_h8l.hef
(hailo) Running command ā€˜parse-hefā€™ with ā€˜hailortcliā€™
Architecture HEF was compiled for: HAILO8L
Network group name: yolov8s, Multi Context - Number of contexts: 3
Network name: yolov8s/yolov8s
VStream infos:
Input yolov8s/input_layer1 UINT8, NHWC(640x640x3)
Output yolov8s/yolov8_nms_postprocess FLOAT32, HAILO NMS(number of classes: 80, maximum bounding boxes per class: 100, maximum frame size: 160320)
Operation:
Op YOLOV8
Name: YOLOV8-Post-Process
Score threshold: 0.200
IoU threshold: 0.70
Classes: 80
Cross classes: false
Max bboxes per class: 100
Image height: 640
Image width: 640

Note that your outputs are not the same.
The post process in Hailo-rpi5-examples assumes you have NMS done as part of the HEF.
In order to add it you should add to your alls script a command like this:
nms_postprocess(ā€œā€¦/ā€¦/postprocess_config/yolov8n_nms_config.jsonā€, meta_arch=yolov8, engine=cpu)

You can search the alls file in our model zoo github (Not all networks are supportedā€¦)
So for examples for yolov8n see:

Note that you can use the original network output without adding the NMS, but, it requires a different post process for each network.

Hi @jiahao.li,

Thanks for the tutorial.
Iā€™m facing the problem stated here.
Would you be able to provide some insights as to how to work around this?

Thank you!