CV / LPRNet

LPRNet

reComputer R Series (CM5 + Hailo-10H)

License-plate recognition on reComputer RK3576, RK3588, and CM5 with Hailo-8 or Hailo-10H.

168 downloads
Precision
RKNN / Hailo HEF

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

Getting Started

Deploy
sudo docker run --rm \
  --name cm5-hailo10h-lprnet \
  --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/lprnet:latest \
  python web_detection.py --model_path model/lprnet.hef --detector_model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4

REST API

Use the REST API to run inference. Copy the commands below.

Curl
curl http://localhost:8080/v1/chat/completions -d '{
  "model": "lprnet-rknn",
  "messages": [{"role": "user", "content": "Hello"}]
}'
Python
import requests

resp = requests.post(
    "http://localhost:8080/v1/chat/completions",
    json={"model": "lprnet-rknn", "messages": [{"role": "user", "content": "Hello"}]},
)
print(resp.json())

Model Details

reComputer R Series (CM5 + Hailo-10H)

LPRNet on reComputer CM5 + Hailo-10H

Tiny-YOLOv4 detects license plates and LPRNet reads the plate text in one pipeline on Hailo-10H through HailoRT 5.1.1.

Model Info

PropertyValue
TaskLicense plate detection + recognition pipeline
DetectorTiny-YOLOv4 (416x416x3, 2 heads, CPU anchor decode)
RecognizerLPRNet (75x300x3, CTC decode to plate string)
Classesplate location + 0-9 plate characters
HEFHailo Model Zoo v5.4.0, Hailo-10H (4.7 MB / 5.1 MB)

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
Python in container3.13, aarch64
bash
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot

hailortcli fw-control identify
ls /dev/hailo0

Run With Demo Video

bash
sudo docker run --rm \
  --name cm5-hailo10h-lprnet \
  --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/lprnet:latest \
  python web_detection.py --model_path model/lprnet.hef --detector_model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4

Open http://<Board_IP>:8000 to view the web preview.

REST API

bash
curl -X POST "http://<Board_IP>:8000/api/models/lprnet/predict" \
  -F "file=@plate.jpg"

Development Notes

  • Source module: src/hailo10h_lprnet/
  • Dockerfile: docker/hailo10h/lprnet.dockerfile
  • Container: ghcr.io/seeed-projects/recomputer-hailo10h-cv/lprnet:latest
  • Uses the HailoRT 5.1.1 multi-output executor.

Inputs and Outputs

RKNN: cropped plate or selected region to recognized text. Hailo: traffic frame to detected plate box and CTC-decoded numeric plate text.