CV / LPRNet
LPRNet
reComputer R Series (CM5 + Hailo-10H)
在 reComputer RK3576、RK3588 和搭载 Hailo-8 或 Hailo-10H 的 CM5 上进行车牌识别。
167 次下载
精度
RKNN / Hailo HEF选择你正在使用的设备,设置指南和文档将相应更新。
快速开始
部署
sudo docker run --rm \
--name cm5-hailo10h-lprnet \
--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/lprnet:latest \
python web_detection.py --model_path model/lprnet.hef --detector_model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4REST API
使用 REST API 进行推理。复制以下命令。
Curl
curl http://localhost:8080/v1/chat/completions -d '{
"model": "lprnet-rknn",
"messages": [{"role": "user", "content": "Hello"}]
}'Python
import requests
resp = requests.post(
"http://localhost:8080/v1/chat/completions",
json={"model": "lprnet-rknn", "messages": [{"role": "user", "content": "Hello"}]},
)
print(resp.json())模型详情
reComputer R Series (CM5 + Hailo-10H)在 reComputer CM5 + Hailo-10H 上运行 LPRNet
Tiny-YOLOv4 负责检测车牌,LPRNet 负责识别车牌文本;两者通过 HailoRT 5.1.1 在 Hailo-10H 上组成一条推理流水线。
模型信息
| 属性 | 值 |
|---|---|
| 任务 | 车牌检测与识别流水线 |
| 检测器 | Tiny-YOLOv4(416×416×3、2 个检测头、CPU 锚框解码) |
| 识别器 | LPRNet(75×300×3,通过 CTC 解码车牌字符串) |
| 类别 | 车牌位置及 0–9 数字字符 |
| HEF | Hailo Model Zoo v5.4.0,Hailo-10H(4.7 MB / 5.1 MB) |
硬件与宿主机配置
| 项目 | 值 |
|---|---|
| 开发板 | 搭载 Raspberry Pi CM5 的 reComputer R Series |
| 加速器 | 通过 PCIe 连接的 Hailo-10H,设备节点为 /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
hailortcli fw-control identify
ls /dev/hailo0使用演示视频运行
bash
sudo docker run --rm \
--name cm5-hailo10h-lprnet \
--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/lprnet:latest \
python web_detection.py --model_path model/lprnet.hef --detector_model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4打开 http://<Board_IP>:8000 查看网页预览。
REST API
bash
curl -X POST "http://<Board_IP>:8000/api/models/lprnet/predict" \
-F "file=@plate.jpg"开发说明
- 源码模块:
src/hailo10h_lprnet/ - Dockerfile:
docker/hailo10h/lprnet.dockerfile - 容器镜像:
ghcr.io/seeed-projects/recomputer-hailo10h-cv/lprnet:latest - 使用 HailoRT 5.1.1 多输出执行器。
输入与输出
RKNN: cropped plate or selected region to recognized text. Hailo: traffic frame to detected plate box and CTC-decoded numeric plate text.