This repository demonstrates object detection model using YOLOv8 on a Raspberry Pi CM4 with Hailo Acceleration. The Raspberry Pi AI Kit enhances the performance of the Raspberry Pi and unlock its potential in artificial intelligence and machine learning applications, like smart retail, smart traffic and more. Although the Raspberry AI Kit is designed for Raspberry Pi 5, we have experimented it on our CM4-powered edge gateway. Excited about turning our edge device into an intelligent IoT gateway!
reComputer R1000: Raspberry Pi CM4 Gateway, 4GB RAM, 32GB eMMC
M.2 hat Raspberry Pi 5(Only need for Raspberry Pi 5)
sudo apt update
sudo apt full-upgrade
sudo raspi-config
Select option "6 Advanced Options":
Then select option "A6 Wayland": Choose "W1 X11" to use X11 backend: Click "OK" to exit.Select option "6 Advanced Options":
Then select option "A8 PCIe Speed": Choose "Yes" to enable PCIe Gen 3 mode: Click "Finish" to exit.Install hailo-all and reboot
sudo apt install hailo-all
sudo reboot
Check that the Hailo software is installed correctly by running the following command:
hailortcli fw-control identify
The true result is as follows:
Check hailo hardware is installed correctly by running the following command:
lspci | grep Hailo
The true result is as follows:
Please reference Respberry Pi 5 to install AI kit on Respberry Pi5.
Install hailo-all and reboot
sudo apt install hailo-all
sudo reboot
Check that the Hailo software is installed correctly by running the following command:
hailortcli fw-control identify
The true result is as follows:
Check hailo hardware is installed correctly by running the following command:
lspci | grep Hailo
The true result is as follows:
Add follows to /boot/firmware/config.txt
#Enable the PCIe external connector
dtparam=pciex1
#Force Gen 3.0 speeds
dtparam=pciex1_gen=3
Note
If you want to use gen2,please comment dtparam=pciex1_gen=3
git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git
cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh object-detection
git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git
cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh object-detection-hailo
git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git
cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh pose-estimation
git clone https://github.com/Seeed-Projects/Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L.git
cd Benchmarking-YOLOv8-on-Raspberry-PI-reComputer-r1000-and-AIkit-Hailo-8L
bash ./run.sh pose-estimation-hailo
we test Yolov8s, with 640*640 input and int8 format. And we also test Yolov8s int8 on Jetson Orin NX 16GB with TensorRT accelerate. The result is shown as below: