Hailo RPI5 Examples Setup & Issues
Initial Setup & Firmware Identification
sudo raspi-config
sudo apt update && sudo apt full-upgrade
sudo apt install hailo-all
sudo reboot
hailortcli fw-control identify
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8
Serial Number: <N/A>
Part Number: <N/A>
Cloning the Repository & Installing Examples
git clone https://github.com/hailo-ai/hailo-rpi5-examples.git
cd hailo-rpi5-examples
./install.sh
---
Error: Meson is not installed.
Next Steps
sudo apt-get install meson
./install.sh
source setup_env.sh
Then
python basic_pipelines/detection.py --input rpi
Issue: Picamera2 Not Defined
File "/home/typeadmin/hailo-rpi5-examples/venv_hailo_rpi5_examples/lib/python3.11/site-packages/hailo_apps_infra/gstreamer_app.py", line 263, in picamera_thread
with Picamera2() as picam2:
^^^^^^^^^
NameError: name 'Picamera2' is not defined
Solution
sudo apt install python3-picamera2 --no-install-recommends
Picamera2 is only supported on Raspberry Pi OS Bullseye (or later) images, both 32 and 64-bit. As of September 2022, Picamera2 is pre-installed on Raspberry Pi OS images, but not on Raspberry Pi OS Lite images. It works on all Raspberry Pi boards right down to the Pi Zero, although performance in some areas may be worse on less powerful devices."
Then try again:
python basic_pipelines/detection.py --input rpi
GStreamer Pipeline Issues with x264enc
gst-launch-1.0 -v \
libcamerasrc camera-name="imx708_wide" ! video/x-raw, format=RGB, width=640, height=640 ! \
queue ! videoscale ! videoconvert ! \
hailonet hef-path=/home/typeadmin/hailo-rpi5-examples/resources/yolov8m.hef ! \
hailofilter ! hailooverlay ! videoconvert ! \
x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=8554 sync=true
Error:
WARNING: erroneous pipeline: no element "x264enc"
gstreamer1.0-plugins-ugly
Further testing
gst-launch-1.0 -v \
libcamerasrc camera-name="imx708_wide" ! video/x-raw, format=RGB, width=640, height=640 ! \
queue ! videoscale ! videoconvert ! \
hailonet hef-path=/home/typeadmin/hailo-rpi5-examples/resources/yolov8m.hef ! \
hailofilter ! hailooverlay ! videoconvert ! \
x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=8554 sync=true
Output
[26:17:04.043300995] [3321] INFO RPI pisp.cpp:1179 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/imx708@1a to CFE device /dev/media4 and ISP device /dev/media2 using PiSP variant BCM2712_C0
ERROR: from element /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0: Could not find a camera named 'imx708_wide'.
Attempting with camera path
ERROR: from element /GstPipeline:pipeline0/GstLibcameraSrc:libcamerasrc0: Could not find a camera named ' /base/axi/pcie@120000/rp1/i2c@80000/imx708@1a'.
Rpicam-hello --list
Available cameras
-----------------
0 : imx708_wide_noir [4608x2592 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@88000/imx708@1a)
Modes: 'SRGGB10_CSI2P' : 1536x864 [120.13 fps - (768, 432)/3072x1728 crop]
2304x1296 [56.03 fps - (0, 0)/4608x2592 crop]
4608x2592 [14.35 fps - (0, 0)/4608x2592 crop]
1 : imx708_wide [4608x2592 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@80000/imx708@1a)
Modes: 'SRGGB10_CSI2P' : 1536x864 [120.13 fps - (768, 432)/3072x1728 crop]
2304x1296 [56.03 fps - (0, 0)/4608x2592 crop]
4608x2592 [14.35 fps - (0, 0)/4608x2592 crop]
I think that’s everything, I wont be suprised if its me doing something really silly, it’s all new to me!
Thank you,