CV / PaddleOCR

PaddleOCR v5 Mobile Detection

Text-region detection for document images on reComputer R Series with Hailo-8 or Hailo-10H.

24 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 op reComputer R Series (CM5 + Hailo-10H)

PaddleOCR v5 Mobile Detection lokaliseert tekstgebieden in documentafbeeldingen op Hailo-10H via HailoRT 5.1.1. De DB-head (Differentiable Binarization) levert een kanskaart; gebieden worden op de CPU geëxtraheerd als vierhoekige polygonen.

Deze pagina is gericht op de reComputer R Series (CM5 + Hailo-10H) met een PCIe-Hailo-10H-versneller.

Modelinformatie

EigenschapWaarde
ArchitectuurPaddleOCR v5 Mobile (DB-tekstdetector)
TaakTekstdetectie
Invoer544×960×3
UitvoerKanskaart van tekstgebieden → vierhoeken
Parameters1,2M
Bewerkingen6,5G
NauwkeurigheidDB-metriek 4,60 (Model Zoo-referentie)
HEFHailo Model Zoo v5.4.0, Hailo-10H

Hardware- en hostconfiguratie

ItemWaarde
BoardreComputer R Series met Raspberry Pi CM5
VersnellerHailo-10H via PCIe, beschikbaar als /dev/hailo0
Host-driverapt-pakket hailo-h10-all
RuntimeHailoRT 5.1.1 (host/container moeten major.minor delen)
Python in container3.13, aarch64
bash
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot

# Na herstart
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

Uitvoeren met demovideo

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 om de webpreview te bekijken (groene vierhoeken rond de gedetecteerde tekstgebieden).

USB-cameramodus

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"
EindpuntMethodeDoel
/api/models/paddle_ocr_v5_mobile_detection/predictPOSTPolygonen van tekstgebieden (JSON)
/api/video_feedGETMJPEG-previewstream
/api/configGET / POSTBox-score-/binarisatiedrempels

Ontwikkelingsnotities

  • Bronmodule: 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
  • DB-nabewerking ongewijzigd; de executor gebruikt de HailoRT 5.1.1 create_infer_model-API.
  • Combineer het op applicatieniveau met de herkenningsmodule om de tekst in elk gedetecteerd gebied te lezen.

Invoer en uitvoer

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