CV / PaddleOCR

PaddleOCR v5 Mobile Detection

reComputer R Series (CM5 + Hailo-8)

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

82 downloads
Size
5.49 MB
Memory
4GB+
Precision
Hailo HEF / HailoRT

Choose the device you're using, the set up guide and documentation will update accordingly.

Getting Started

Deploy
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

Model Details

reComputer R Series

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

PaddleOCR v5 Mobile Detection finds text regions in a full document image. It is an independent model: use its polygons or boxes to crop text lines before sending them to a text-recognition model.

Model information

PropertyValue
TaskText detection
Input544 × 960 × 3 image
OutputText-region quadrilaterals and axis-aligned boxes
HEFHailo-8 PaddleOCR detection HEF
RuntimeHailoRT 4.23.x

Host requirements

The Hailo-8 driver, firmware, host libhailort.so, and Python wheel inside the image must use matching HailoRT major/minor versions.

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

Run the demo

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

Open http://<PI_IP>:8000 for the preview.

REST API

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

The response returns a predictions array; each item contains a polygon and an axis-aligned box in source-image coordinates.

Relationship to recognition

This model does not decode text. Crop or rectify each detected line and pass it to PaddleOCR v5 Mobile Recognition as a separate deployment.

Inputs and Outputs

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