CV / PaddleOCR

PaddleOCR v5 移动端文本检测

reComputer R Series (CM5 + Hailo-8)

在搭载 Hailo-8 或 Hailo-10H 的 reComputer R Series 上检测文档图像中的文本区域。

82 次下载
大小
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

PaddleOCR v5 Mobile Detection 在 reComputer R Series(CM5 + Hailo-8)上运行

PaddleOCR v5 Mobile Detection 在整张文档图像中定位文本区域。它是一个独立模型:先用其多边形或框裁剪出文本行,再送入文本识别模型。

模型信息

属性值
任务文本检测
输入544 × 960 × 3 图像
输出文本区域四边形和轴对齐框
HEFHailo-8 PaddleOCR 检测 HEF
运行时HailoRT 4.23.x

主机要求

镜像内的 Hailo-8 驱动、固件、主机 libhailort.so 和 Python wheel 必须使用匹配的 HailoRT 主次版本。

bash
sudo apt update
sudo apt install hailort hailort-pcie-driver python3-hailort
sudo reboot

hailortcli --version
hailortcli fw-control identify
ls -l /dev/hailo0

运行演示

bash
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

打开 http://<PI_IP>:8000 查看预览。

REST API

bash
curl -X POST "http://<PI_IP>:8000/api/models/paddle_ocr_v5_mobile_detection/predict" \
  -F "file=@document.png"

响应返回一个 predictions 数组;每个条目包含源图像坐标下的 polygon(多边形)和轴对齐 box(框)。

与识别模型的关系

本模型不解码文本。将每个检测到的文本行裁剪或校正后,作为独立部署传给 PaddleOCR v5 Mobile Recognition。

输入与输出

Input: full document image or demo video frame. Output: detected text-region polygons, bounding boxes, and annotated MJPEG preview.