CV / LPRNet
LPRNet
reComputer R Series (CM5 + Hailo-8)
License-plate recognition on reComputer RK3576, RK3588, and CM5 with Hailo-8 or Hailo-10H.
Choose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
sudo docker run --rm \
--name cm5-hailo8-lprnet \
--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/lprnet:latest \
python web_detection.py --model_path model/lprnet.hef --detector_model_path model/tiny_yolov4_license_plates.hef --video_path video/test.mp4REST API
Use the REST API to run inference. Copy the commands below.
curl http://localhost:8080/v1/chat/completions -d '{
"model": "lprnet-rknn",
"messages": [{"role": "user", "content": "Hello"}]
}'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-8)LPRNet Pipeline on CM5 + Hailo-8
Model information
This application runs two official Hailo-8 HEFs:
tiny_yolov4_license_platesdetects a plate box from a 416x416 traffic frame.lprnetresizes the original-resolution plate crop to 300x75 BGR and emits 5x19x11 logits.
The OCR post-process follows Hailo TAPPAS: average the five output slices, apply softmax, perform CTC greedy decoding, reject repeats and the blank class, then require mean character confidence of at least 0.90 and at least seven decoded digits. A Laplacian-variance gate rejects blurry crops before OCR.
The official alphabet is
0123456789-. This HEF cannot recognize letters or Chinese province characters, so it does not support complete Chinese blue-plate strings.
The Model Zoo v2.17 configuration reports 99.86% accuracy on Hailo's internal dataset. This is source metadata, not a local CM5 benchmark.
Run
sudo docker run --rm \
--name cm5-hailo8-lprnet \
--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/lprnet:latest \
python web_detection.py \
--model_path model/lprnet.hef \
--detector_model_path model/tiny_yolov4_license_plates.hef \
--video_path video/test.mp4Open http://<Board_IP>:8000.
REST API
curl -X POST "http://<Board_IP>:8000/api/models/lprnet/predict" \
-F "file=@traffic.jpg"Each prediction includes the detector box/confidence, crop quality, OCR
candidate/confidence, and an accepted plate value or null.
Sources and validation
- OCR HEF: Hailo Model Zoo v2.16, Hailo-8 target.
- Detector HEF: Hailo Model Zoo v2.17, Hailo-8 target.
- OCR algorithm and demo video: Hailo TAPPAS v3.29.
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.