CV / PaddleOCR
PaddleOCR v5 Mobile Detection
Text-region detection for document images on reComputer R Series with Hailo-8 or Hailo-10H.
24 次下载
大小
5.49 MB内存
4GB+精度
Hailo HEF / HailoRT选择你正在使用的设备,设置指南和文档将相应更新。
快速开始
部署
sudo docker run --rm \
--name cm5-hailo8-paddle-ocr-v5-mobile-detection \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo8-cv/paddle_ocr_v5_mobile_detection:latest \
python web_detection.py --model_path model/paddle_ocr_v5_mobile_detection.hef --video_path video/test.mp4模型详情
reComputer R Series (CM5 + Hailo-10H)PaddleOCR v5 Mobile Detection 在 reComputer R Series(CM5 + Hailo-10H)上运行
PaddleOCR v5 Mobile Detection 通过 HailoRT 5.1.1 在 Hailo-10H 上定位文档图像中的文本区域。DB(可微分二值化)检测头输出概率图;区域在 CPU 上提取为四边形多边形。
本页面向搭配 PCIe Hailo-10H 加速器的 reComputer R Series(CM5 + Hailo-10H)。
模型信息
| 属性 | 值 |
|---|---|
| 架构 | PaddleOCR v5 Mobile(DB 文本检测器) |
| 任务 | 文本检测 |
| 输入 | 544×960×3 |
| 输出 | 文本区域概率图 → 四边形 |
| 参数量 | 1.2M |
| 计算量 | 6.5G |
| 精度 | 4.60 DB 指标(Model Zoo 参考值) |
| HEF | Hailo Model Zoo v5.4.0,Hailo-10H |
硬件与主机设置
| 项目 | 值 |
|---|---|
| 开发板 | reComputer R Series(树莓派 CM5) |
| 加速器 | 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
# Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun
sudo systemctl enable docker
sudo systemctl start docker使用演示视频运行
bash
sudo docker run --rm \
--name hailo10h-paddle-ocr-detection \
--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/paddle_ocr_v5_mobile_detection:latest \
python web_detection.py --model_path model/paddle_ocr_v5_mobile_detection.hef --video_path video/test.mp4打开 http://<Board_IP>:8000 查看 Web 预览(检测到的文本区域周围为绿色四边形)。
USB 摄像头模式
bash
sudo docker run --rm \
--name hailo10h-paddle-ocr-detection \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
--device /dev/video0:/dev/video0 \
-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/paddle_ocr_v5_mobile_detection:latest \
python web_detection.py --model_path model/paddle_ocr_v5_mobile_detection.hef --camera_id 0REST API
bash
curl -X POST "http://<Board_IP>:8000/api/models/paddle_ocr_v5_mobile_detection/predict" \
-F "file=@test.png"| 端点 | 方法 | 用途 |
|---|---|---|
/api/models/paddle_ocr_v5_mobile_detection/predict | POST | 文本区域多边形(JSON) |
/api/video_feed | GET | MJPEG 预览流 |
/api/config | GET / POST | 框分数/二值化阈值 |
开发说明
- 源码模块:
src/hailo10h_paddle_ocr_v5_mobile_detection/ - Dockerfile:
docker/hailo10h/paddle_ocr_v5_mobile_detection.dockerfile - 容器镜像:
ghcr.io/seeed-projects/recomputer-hailo10h-cv/paddle_ocr_v5_mobile_detection:latest - DB 后处理不变;执行器为 HailoRT 5.1.1 的
create_infer_modelAPI。 - 在应用层与识别模块配对,读取每个检测区域内的文本。
输入与输出
Input: full document image or demo video frame. Output: detected text-region polygons, bounding boxes, and annotated MJPEG preview.