本项目展示了 Ultralytics YOLOv8n 模型在 树莓派4B 上的基准测试结果。 This project showcases the benchmark results of the Ultralytics YOLOv8n model on the Raspberry Pi 4B.
测试环境:
- 设备: 树莓派4B(4GB)
- 系统: Raspberry Pi OS (Debian GNU/Linux 13)
- Ultralytics 版本: 8.4.37
Environment:
- Device: Raspberry Pi 4B (4GB)
- OS: Raspberry Pi OS (Debian GNU/Linux 13)
- Ultralytics Version: 8.4.37
| 格式(部分) | Format(Partial) | 大小 | Size (MB) | 指标/mAP50-95(边界框) | metrics/mAP50-95(B) | 推理时间 | Inference time (ms/im) | 帧率 | FPS |
|---|---|---|---|---|
| PyTorch | 6.2 ✨ | 0.637 ✨ | 1821.62 | 0.55 |
| TorchScript | 12.4 | 0.6082 | 1891.99 | 0.53 |
| ONNX | 12.3 | 0.6082 | 545.92 | 1.83 |
| OpenVINO | 12.3 | 0.6082 | 441.63 | 2.26 |
| MNN | 12.2 | 0.6082 | 571.52 | 1.75 |
| NCNN | 12.2 | 0.6082 | 433.79 ✨ | 2.31 ✨ |
| 格式(部分) | Format(Partial) | 大小 | Size (MB) | 指标/mAP50-95(边界框) | metrics/mAP50-95(B) | 推理时间 | Inference time (ms/im) | 帧率 | FPS |
|---|---|---|---|---|
| PyTorch | 6.2 ✨ | 0.5212 ✨ | 1021.98 | 0.98 |
| TorchScript | 12.4 | 0.5613 | 925.17 | 1.08 |
| ONNX | 12.2 | 0.5613 | 242.49 | 4.12 |
| OpenVINO | 12.3 | 0.5613 | 352.06 | 2.84 |
| MNN | 12.1 | 0.5613 | 243.8 | 4.1 |
| NCNN | 12.1 | 0.5613 | 209.55 ✨ | 4.77 ✨ |
| 格式(部分) | Format(Partial) | 大小 | Size (MB) | 指标/mAP50-95(边界框) | metrics/mAP50-95(B) | 推理时间 | Inference time (ms/im) | 帧率 | FPS |
|---|---|---|---|---|
| PyTorch | 6.2 ✨ | 0.4338 ✨ | 504.99 | 1.98 |
| TorchScript | 12.4 | 0.4521 | 628.29 | 1.59 |
| ONNX | 12.1 | 0.4521 | 163.12 | 6.13 |
| OpenVINO | 12.3 | 0.4521 | 169.15 | 5.91 |
| MNN | 12.1 | 0.4522 | 145.41 | 6.88 |
| NCNN | 12.1 | 0.4521 | 138.83 ✨ | 7.2 ✨ |
推理时间不包含预处理和后处理。测试时设备配备外部散热,运行期间 CPU 温度稳定在30°C左右。 Inference time excludes pre/post-processing. The device was equipped with external cooling; CPU temperature remained stable at approximately 30°C throughout the benchmark.
要在所有导出格式上重现上述基准测试,请运行以下代码: To reproduce the above benchmarks on all export formats, run this code:
# 在所有导出格式上对 COCO8 数据集进行 YOLOv8n 速度和精度基准测试 # Benchmark YOLOv8n speed and accuracy on the COCO8 dataset for all export formats yolo benchmark model=yolov8n.pt data=coco8.yaml imgsz=640 yolo benchmark model=yolov8n.pt data=coco8.yaml imgsz=416 yolo benchmark model=yolov8n.pt data=coco8.yaml imgsz=320