Update your Raspberry Pi to run the latest software:
sudo apt update && sudo apt full-upgrade
While using Gen2 is an option, it will result in lower performance. The Hailo AI HAT is auto detected as Gen3, but if you are using the M.2 HAT, you will need to set it manually.
sudo raspi-config
Select option 6 Advanced Options > A8 PCIe Speed
then choose Yes
to enable PCIe Gen 3 mode, and then reboot the device.
Run Raspberry Pi configuration tool,
under Advanced Options > Bootloader Version
choose Latest
:
sudo raspi-config
This should also prompt you and install the latest firmware,
if it didn't, run sudo rpi-eeprom-update -a
.
And finally reboot the device:
sudo reboot
To confirm the HAT installation run hailortcli fw-control identify
and you should see something like this:
Executing on device: 0001: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: HAILO8L
Serial Number: HLDDLBB242601189
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
Test TAPPAS Core installation by running the following commands:
gst-inspect-1.0 hailotools
Expected result:
god@pi5ai:~ $ gst-inspect-1.0 hailotools
Plugin Details:
Name hailotools
Description hailo tools plugin
Filename /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so
Version 3.31.0
License unknown
Source module gst-hailo-tools
Binary package gst-hailo-tools
Origin URL https://hailo.ai/
hailoaggregator: hailoaggregator - Cascading
hailocounter: hailocounter - postprocessing element
hailocropper: hailocropper
hailoexportfile: hailoexportfile - export element
hailoexportzmq: hailoexportzmq - export element
hailofilter: hailofilter - postprocessing element
hailogallery: Hailo gallery element
hailograytonv12: hailograytonv12 - postprocessing element
hailoimportzmq: hailoimportzmq - import element
hailomuxer: Muxer pipeline merging
hailonv12togray: hailonv12togray - postprocessing element
hailonvalve: HailoNValve element
hailooverlay: hailooverlay - overlay element
hailoroundrobin: Input Round Robin element
hailostreamrouter: Hailo Stream Router
hailotileaggregator: hailotileaggregator
hailotilecropper: hailotilecropper - Tiling
hailotracker: Hailo object tracking element
18 features:
+-- 18 elements
Clone the examples repository:
git clone https://github.com/hailo-ai/hailo-rpi5-examples.git
Run the automated install process:
cd hailo-rpi5-examples && ./install.sh
While inside hailo-rpi5-examples
activate the Python virtual environment:
source setup_env.sh
This is the expected result:
god@pi5ai:~/hailo/hailo-rpi5-examples $ source setup_env.sh
Setting up the environment...
Setting up the environment for hailo-tappas-core...
TAPPAS_VERSION is 3.31.0. Proceeding...
You are not in the venv_hailo_rpi5_examples virtual environment.
Virtual environment exists. Activating...
TAPPAS_POST_PROC_DIR set to /usr/lib/aarch64-linux-gnu/hailo/tappas/post_processes
DEVICE_ARCHITECTURE is set to: HAILO8L
(venv_hailo_rpi5_examples) god@pi5ai:~/hailo/hailo-rpi5-examples $
Run simple detection example:
python basic_pipelines/detection_simple.py
Run full detection example:
python basic_pipelines/detection.py
To close the applications press Ctrl+C
Running with Raspberry Pi camera input:
python basic_pipelines/detection.py --input rpi
Running with USB webcam input:
python basic_pipelines/detection.py --input usb