CV / PaddleOCR

PaddleOCR v5 Mobile Recognition

PaddleOCR v5 Mobile Recognition decodes one cropped text-line image into text and a CTC confidence value through a Hailo-8 or Hailo-10H FastAPI service.

5 downloads
Grootte
7.48 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-recognition \
  --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_recognition:latest \
  python web_detection.py --model_path model/paddle_ocr_v5_mobile_recognition.hef --video_path video/test.mp4

Modeldetails

reComputer R Series (CM5 + Hailo-10H)

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

PaddleOCR v5 Mobile Recognition decodes one cropped text-line image into a text string with a CTC confidence value on Hailo-10H through HailoRT 5.1.1.

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

Model Info

PropertyValue
ArchitecturePaddleOCR v5 Mobile (CRNN-style CTC recognizer)
TaskText Recognition
Input48×320×3 (one text line)
OutputCTC logits → decoded string + confidence
Parameters4.1M
Operations1.5G
Accuracy62.37 recognition 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-recognition \
  --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_recognition:latest \
  python web_detection.py --model_path model/paddle_ocr_v5_mobile_recognition.hef --video_path video/test.mp4

Open http://<Board_IP>:8000 to view the web preview — the demo is a single text line; the recognized string and confidence are drawn on a white strip below the frame (aspect ratio preserved via letterbox).

REST API

bash
curl -X POST "http://<Board_IP>:8000/api/models/paddle_ocr_v5_mobile_recognition/predict" \
  -F "file=@line.png"
EndpointMethodPurpose
/api/models/paddle_ocr_v5_mobile_recognition/predictPOSTDecoded text + confidence (JSON)
/api/video_feedGETMJPEG preview stream
/api/video/upload + /api/video/analyzePOSTOffline video analysis

Development Notes

  • Source module: src/hailo10h_paddle_ocr_v5_mobile_recognition/
  • Dockerfile: docker/hailo10h/paddle_ocr_v5_mobile_recognition.dockerfile
  • Container: ghcr.io/seeed-projects/recomputer-hailo10h-cv/paddle_ocr_v5_mobile_recognition:latest
  • Ported from the validated Hailo-8 module (includes the CTC double-batch-dim fix and the letterboxed MJPEG preview); executor swapped to the HailoRT 5.1.1 create_infer_model API.
  • Feed it crops from the detection module to read the text inside each detected region.

Invoer en uitvoer

Input: cropped single-line text image or demo video frame. Output: CTC-decoded text, confidence, and annotated MJPEG preview.