I have the M.2 hat for the pi 5 with a Hailo 8 on it and I am trying to use the examples from GitHub - hailo-ai/hailo-rpi5-examples. If I run it with input resources it works fine, but trying to run it with a camera causes problems. Just running detection.py from the virtual environment with no arguments gives me the following output
hailomuxer name=hmux v4l2src device=/dev/video0 name=src_0 ! video/x-raw, width=640, height=480, framerate=30/1 ! 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 qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=/home/cmc/hailo-rpi5-examples/basic_pipelines/../resources/yolov6n.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/home/cmc/hailo-rpi5-examples/basic_pipelines/../resources/libyolo_hailortpp_post.so qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=false text-overlay=False signal-fps-measurements=true
Error: gst-resource-error-quark: Failed to allocate required memory. (13), ../sys/v4l2/gstv4l2src.c(976): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:src_0:
Buffer pool activation failed
Running it with my custom modelās .hef file gives me
hailomuxer name=hmux v4l2src device=/dev/video0 name=src_0 ! video/x-raw, width=640, height=480, framerate=30/1 ! 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 qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=hailo_090.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/home/cmc/hailo-rpi5-examples/basic_pipelines/../resources/libyolo_hailortpp_post.so qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=false text-overlay=False signal-fps-measurements=true
gst_parse_error: could not link videoconvert0 to hailonet0 (3)
hailomuxer name=hmux v4l2src device=/dev/video0 name=src_0 ! video/x-raw, width=640, height=480, framerate=30/1 ! 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 qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=hailo_090.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/home/cmc/hailo-rpi5-examples/basic_pipelines/../resources/libyolo_hailortpp_post.so qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=false text-overlay=False signal-fps-measurements=true
Output of dmesg | grep hailo
[ 3.736720] hailo: Init module. driver version 4.17.0
[ 3.738906] hailo 0000:01:00.0: Probing on: 1e60:2864...
[ 3.738915] hailo 0000:01:00.0: Probing: Allocate memory for device extension, 11600
[ 3.738933] hailo 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.738940] hailo 0000:01:00.0: Probing: Device enabled
[ 3.738960] hailo 0000:01:00.0: Probing: mapped bar 0 - 000000005c218efe 16384
[ 3.738966] hailo 0000:01:00.0: Probing: mapped bar 2 - 000000006e1c092f 4096
[ 3.738971] hailo 0000:01:00.0: Probing: mapped bar 4 - 000000005e3a15ca 16384
[ 3.745732] hailo 0000:01:00.0: Probing: Force setting max_desc_page_size to 4096 (recommended value is 16384)
[ 3.745748] hailo 0000:01:00.0: Probing: Enabled 64 bit dma
[ 3.745751] hailo 0000:01:00.0: Probing: Using userspace allocated vdma buffers
[ 3.745757] hailo 0000:01:00.0: Disabling ASPM L0s
[ 3.745761] hailo 0000:01:00.0: Successfully disabled ASPM L0s
[ 3.943270] hailo 0000:01:00.0: Firmware was loaded successfully
[ 4.019130] hailo 0000:01:00.0: Probing: Added board 1e60-2864, /dev/hailo0
Output of hailortcli fw-control identify
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: HLDDLBB241901953
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
I already checked to make sure the hailort service was running with sudo systemctl status hailort.service
but I still restarted it anyway and rebooted the pi, and that didnāt fix it.