CV / PaddleOCR

PaddleOCR v5 Mobile Detection

PaddleOCR v5 Mobile Detection locates text regions in an uploaded document image and returns quadrilateral polygons and bounding boxes through a Hailo-8 or Hailo-10H FastAPI service.

3 downloads
Grootte
5.49 MB
Geheugen
4GB+
Precisie
Hailo HEF / HailoRT

Kies het apparaat dat je gebruikt. De installatiehandleiding en documentatie worden dienovereenkomstig bijgewerkt.

Aan de slag

Implementeren
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

Modeldetails

reComputer R Series (CM5 + Hailo-10H)

PaddleOCR v5 Mobile Detection on reComputer R Series (CM5 + Hailo-10H)

PaddleOCR v5 Mobile Detection locates text regions in document images on Hailo-10H through HailoRT 5.1.1. The DB (Differentiable Binarization) head outputs a probability map; regions are extracted on the CPU as quadrilateral polygons.

This page targets reComputer R Series (CM5 + Hailo-10H) with a PCIe Hailo-10H accelerator.

Model Info

PropertyValue
ArchitecturePaddleOCR v5 Mobile (DB text detector)
TaskText Detection
Input544×960×3
Outputtext-region probability map → quadrilaterals
Parameters1.2M
Operations6.5G
Accuracy4.60 DB metric (Model Zoo reference)
HEFHailo Model Zoo v5.4.0, Hailo-10H

Hardware and Host Setup

ItemValue
BoardreComputer R Series with Raspberry Pi CM5
AcceleratorHailo-10H over PCIe, exposed as /dev/hailo0
Host driverhailo-h10-all apt package
RuntimeHailoRT 5.1.1 (host / container must share major.minor)
Python in container3.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

Run With Demo Video

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

Open http://<Board_IP>:8000 to view the web preview (green quadrilaterals around detected text regions).

USB Camera Mode

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 0

REST API

bash
curl -X POST "http://<Board_IP>:8000/api/models/paddle_ocr_v5_mobile_detection/predict" \
  -F "file=@test.png"
EndpointMethodPurpose
/api/models/paddle_ocr_v5_mobile_detection/predictPOSTText-region polygons (JSON)
/api/video_feedGETMJPEG preview stream
/api/configGET / POSTBox score / binarization thresholds

Development Notes

  • Source module: src/hailo10h_paddle_ocr_v5_mobile_detection/
  • Dockerfile: docker/hailo10h/paddle_ocr_v5_mobile_detection.dockerfile
  • Container: ghcr.io/seeed-projects/recomputer-hailo10h-cv/paddle_ocr_v5_mobile_detection:latest
  • Ported from the validated Hailo-8 module; DB post-processing unchanged, executor swapped to the HailoRT 5.1.1 create_infer_model API.
  • Pair it with the recognition module at the application level to read the text inside each detected region.

Invoer en uitvoer

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