Can't run face detection

For some reason I just can’t run face detection on the Raspberry Pi 5 even with the following successful tests. Can anyone help me determine what the issue is?

This works as expected:

$ hailortcli fw-control identify
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.18.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB242500058
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP

This also works as expected:

$ hailortcli run Downloads/retinaface_mobilenet_v1.hef
Running streaming inference (Downloads/retinaface_mobilenet_v1.hef):
Transform data: true
Type: auto
Quantized: true
Network retinaface_mobilenet_v1/retinaface_mobilenet_v1: 100% | 212 | FPS: 42.35 | ETA: 00:00:00

Inference result:
Network group: retinaface_mobilenet_v1
Frames count: 211
FPS: 42.15
Send Rate: 952.95 Mbit/s
Recv Rate: 234.51 Mbit/s

But when I do:

$ gst-launch-1.0 hailomuxer name=hmux libcamerasrc ! video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! queue name=hailo_preprocess_q_0 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoscale qos=false n-threads=2 ! video/x-raw, pixel-aspect-ratio=1/1 ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=2 qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailonet hef-path=/home/user/Downloads/retinaface_mobilenet_v1.hef ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas/post_processes/libface_detection_post.so qos=false function_name=retinaface ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailooverlay qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=2 qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! autovideosink sync=false

I get:

[HailoRT] [error] CHECK failed - Error opening file /home/user/Downloads/retinaface_mobilenet_v1.hef
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OPEN_FILE_FAILURE(13)
[HailoRT] [error] Failed parsing HEF file
[HailoRT] [error] Failed creating HEF
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OPEN_FILE_FAILURE(13)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OPEN_FILE_FAILURE(13)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OPEN_FILE_FAILURE(13)
CHECK_EXPECTED failed with status=13
Setting pipeline to PAUSED …

Hey @M_S

Troubleshooting HEF File Access Error (HAILO_OPEN_FILE_FAILURE)

The error suggests GStreamer can’t access the HEF file at /home/user/Downloads/retinaface_mobilenet_v1.hef. Try these steps:

  1. Check File Permissions:

    • View permissions: ls -l /home/user/Downloads/retinaface_mobilenet_v1.hef
    • If needed, grant read access: chmod +r /home/user/Downloads/retinaface_mobilenet_v1.hef
  2. Verify File Existence:

    • Confirm file presence: ls /home/user/Downloads/retinaface_mobilenet_v1.hef
  3. Path Accuracy:

    • Ensure the absolute path is correct for your system
    • Check user access to the specified directory
  4. File Integrity:

    • If issues persist, try re-downloading or regenerating the HEF file
  5. GStreamer and Hailo Setup:

    • Verify plugin installation:
      gst-inspect-1.0 hailonet
      gst-inspect-1.0 hailofilter
      
    • Ensure compatibility with your Raspberry Pi 5 configuration

If problems continue, double-check your Hailo software environment and GStreamer installation.

Regards

Thank you so much. I had an issue in my path! :sweat_smile:

Once you have downloaded the compliled “retinaface_mobilenet_v1” from Model Zoo by Hailo | AI Model Explorer to Find The Best NN Model (Remember to set for Hailo-8l)

This command works for a webcam attached to the Raspberry pi!

gst-launch-1.0 hailomuxer name=hmux v4l2src device=/dev/video0 name=src_0 ! video/x-raw, width=640, height=480, framerate=30/1 ! queue name=hailo_preprocess_q_0 leaky=no max-size-buffers=5 max-size-bytes=0 max-size-time=0 ! decodebin ! videoconvert ! videoscale qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailonet hef-path=/home/YOUR_USERNAME_HERE/Downloads/retinaface_mobilenet_v1.hef ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas/post_processes/libface_detection_post.so qos=false function_name=retinaface ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! hailooverlay qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=2 qos=false ! queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! autovideosink sync=false

2 Likes