CV / 车牌
Tiny-YOLOv4 车牌检测
reComputer R Series (CM5 + Hailo-10H)
在搭载 Hailo-8 或 Hailo-10H 的 reComputer R Series 上进行单类别车牌检测。
55 次下载
大小
8.21 MB内存
4GB+精度
Hailo HEF / HailoRT 4.23.x (Hailo-8) / 5.1.1 (Hailo-10H)选择你正在使用的设备,设置指南和文档将相应更新。
快速开始
部署
sudo docker run --rm \
--name cm5-hailo10h-plate-detector \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/tiny_yolov4_license_plates:latest \
python web_detection.py --model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4REST API
使用 REST API 进行推理。复制以下命令。
Curl
curl -X POST "http://<Board_IP>:8000/api/models/tiny_yolov4_license_plates/predict" \
-F "file=@traffic.jpg"Python
import requests
response = requests.post(
"http://<Board_IP>:8000/api/models/tiny_yolov4_license_plates/predict",
files={"file": open("traffic.jpg", "rb")},
timeout=30,
)
print(response.json())模型详情
reComputer R Series (CM5 + Hailo-10H)在 reComputer CM5 + Hailo-10H 上运行 Tiny-YOLOv4 License Plates
Tiny-YOLOv4 通过 HailoRT 5.1.1 在 Hailo-10H 上检测车牌(单类别)。HEF 暴露 2 个原始 YOLO 输出头;锚框解码和 NMS 在 CPU 上执行。
模型信息
| 属性 | 值 |
|---|---|
| 任务 | 车牌检测(单类别) |
| 输入 | 416x416x3 |
| 输出 | 13x13x18 和 26x26x18 原始 YOLO 输出头 |
| HEF | Hailo Model Zoo v5.4.0, Hailo-10H (5.1 MB) |
硬件与主机设置
| 项目 | 值 |
|---|---|
| 开发板 | 配备 Raspberry Pi CM5 的 reComputer R Series |
| 加速器 | Hailo-10H 通过 PCIe 连接,设备为 /dev/hailo0 |
| 主机驱动 | hailo-h10-all apt 软件包 |
| 运行时 | HailoRT 5.1.1 |
| 容器内 Python | 3.13, aarch64 |
bash
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot
# After reboot
hailortcli fw-control identify
ls /dev/hailo0使用演示视频运行
bash
sudo docker run --rm \
--name cm5-hailo10h-plate-detector \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/tiny_yolov4_license_plates:latest \
python web_detection.py --model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4REST API
bash
curl -X POST "http://<Board_IP>:8000/api/models/tiny_yolov4_license_plates/predict" -F "file=@plate.jpg"开发说明
- 源码模块:
src/hailo10h_tiny_yolov4_license_plates/ - Dockerfile:
docker/hailo10h/tiny_yolov4_license_plates.dockerfile - 容器:
ghcr.io/seeed-projects/recomputer-hailo10h-cv/tiny_yolov4_license_plates:latest - 执行器封装了 HailoRT 5.1.1 的多输出
create_infer_model。 - HEF:Hailo Model Zoo v5.4.0 的 hailo10h 构建。
输入与输出
Input: 416x416 RGB traffic frame. Output: license-plate confidence and xyxy box after raw-head decoding and CPU NMS.