I bought the Raspberry Pi 5 + AI Kit Fully Assembled from Canakit. It came with Raspian preloaded but found I needed to install a bunch of things and piece some information together to get it working.
Installing Halio Dependencies
Go here and get the deps you need: Software Downloads (this link was inexplicably difficult to find). You want to have 4.18 of everything:
* HalioRT - PCIe driver Ubuntu package (deb) → hailort_4.18.0_arm64.deb
* HailoRT – Python package (whl) for Python 3.11, aarch64 (assuming you’re using Python 3.11) → hailort-4.18.0-cp311-cp311-linux_aarch64.whl
* HailoRT – Ubuntu package (deb) for arm64 → hailort-pcie-driver_4.18.0_all.deb
Install them with supo dpkg -i hailort_4.18.0_arm64.deb && sudo dpkg -i hailort-pcie-driver_4.18.0_all.deb
and reboot.
(Sidequest: Installing Python 3.11 if you haven’t)
My preference is to use uv
for this:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11
uv venv halio
source halio/bin/activate
uv pip install ./hailort-4.18.0-cp311-cp311-linux_aarch64.whl
Getting object detection working:
I’ll be using the example here: https://github.com/hailo-ai/Hailo-Application-Code-Examples/blob/main/runtime/python/object_detection/README.md
git clone https://github.com/hailo-ai/Hailo-Application-Code-Examples.git
cd Hailo-Application-Code-Examples/runtime/python/object_detection
uv pip install -r requirements.txt
Follow the instructions in the README.md
there. I found there were two problems:
- The model they download in
download_resources.sh
is not correct, I think it’s for4.17
instead of4.18
. I found the correct model in the model zoo repository. Seeyolov7
and download theCompiled
model. You can run this command:curl https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.12.0/hailo8l/yolov7.hef -o yolov7.hef
, overwriting the previous download if you have it. - There is an error with
CHECK failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096
. I fixed this by creating the file/etc/modprobe.d/hailo_pci.conf
and includingoptions hailo_pci force_desc_page_size=4096
in it.
After these fixes, I can run ./object_detection.py -n ./yolov7.hef -i street.jpg
on my own image, stree.jpg
and it works.