在 RPi5 和 CM4 上使用 rpi ai kit 运行 yolov8s 的基准测试
简介
YOLOv8(You Only Look Once 第 8 版)是最受欢迎的 YOLO 系列实时姿态估计和目标检测模型。它在前代产品的基础上,在速度、精度和灵活性方面引入了多项改进。Raspberry-pi-AI-kit 用于加速推理速度,配备了基于 Hailo-8L 芯片构建的 13 TOPS 神经网络推理加速器。
本 wiki 展示了在 Raspberry Pi 5 和 Raspberry Pi Compute Module 4 上进行 YOLOv8s 姿态估计和目标检测的基准测试。所有测试都使用相同的模型(YOLOv8s),量化为 int8,输入尺寸为 640x640 分辨率,批处理大小设置为 1,并使用来自同一视频的 240 FPS 输入。
准备硬件
适用于 CM4
适用于 Raspberry Pi 5
适用于 Raspberry Pi CM5
运行此项目
- Pi5 基准测试
- CM4 基准测试
在 RPi5 上安装 AI kit
请参考此处
安装 Hailo 软件并验证安装
更新系统
sudo apt update
sudo apt full-upgrade
设置 pcie 为 gen2/gen3(gen3 比 gen2 更快)
将以下文本添加到 /boot/firmware/config.txt
#Enable the PCIe external connector
dtparam=pciex1
#Force Gen 3.0 speeds
dtparam=pciex1_gen=3
如果您想使用 gen2,请注释掉 dtparam=pciex1_gen=3
安装 hailo-all 并重启
在 Raspberry Pi5 上打开终端,输入以下命令来安装 Hailo 软件。
sudo apt install hailo-all
sudo reboot
检查软件和硬件
在 Raspberry Pi5 上打开终端,输入以下命令来检查 hailo-all 是否已安装。
hailortcli fw-control identify
正确的结果如下所示:

在 Raspberry Pi5 上打开终端,输入以下命令来检查 hailo-8L 是否已连接。
lspci | grep 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
运行项目
# run pose estimation with AI kit
bash run.sh pose-estimation-hailo
# run pose estimation without AI kit
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
运行项目
# run object detection with AI kit
bash run.sh object-detection-hailo
# run object detection without AI kit
bash run.sh object-detection
结果
对于目标检测,请参考以下 wiki: yolov8_object_detection_on_recomputer_r1000_with_hailo_8l
对于姿态估计,请参考以下 wiki: yolov8_pose_estimation_on_recomputer_r1000_with_hailo_8l
结果
- batchsize=8
- batchsize=1




技术支持与产品讨论
感谢您选择我们的产品!我们在这里为您提供不同的支持,以确保您使用我们产品的体验尽可能顺畅。我们提供多种沟通渠道,以满足不同的偏好和需求。





