CV / LPRNet

LPRNet

reComputer R Series (CM5 + Hailo-10H)

reComputer RK3576、RK3588、および Hailo-8 または Hailo-10H 搭載の CM5 でナンバープレートを認識します。

167 ダウンロード
精度
RKNN / Hailo HEF

使用しているデバイスを選択してください。セットアップガイドとドキュメントがそれに応じて更新されます。

はじめる

デプロイ
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

REST API を使用して推論を実行します。以下のコマンドをコピーしてください。

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())

モデル詳細

reComputer R Series (CM5 + Hailo-10H)

reComputer CM5 + Hailo-10H 上の LPRNet

Tiny-YOLOv4 がナンバープレートを検出し、LPRNet がプレート文字を読み取るパイプラインを、HailoRT 5.1.1 を介して Hailo-10H 上で一元的に実行します。

モデル情報

項目値
タスクナンバープレート検出 + 認識パイプライン
検出器Tiny-YOLOv4(416x416x3、2ヘッド、CPU アンカーデコード)
認識器LPRNet(75x300x3、CTC デコードでプレート文字列を出力)
クラスplate location + 0-9 のプレート文字
HEFHailo Model Zoo v5.4.0、Hailo-10H(4.7 MB / 5.1 MB)

ハードウェアとホストのセットアップ

項目値
ボードRaspberry Pi CM5 搭載 reComputer R Series
アクセラレータPCIe 経由の Hailo-10H、/dev/hailo0 として公開
ホストドライバhailo-h10-all apt パッケージ
ランタイムHailoRT 5.1.1
コンテナ内 Python3.13、aarch64
bash
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot

hailortcli fw-control identify
ls /dev/hailo0

デモ動画で実行

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

http://<Board_IP>:8000 を開くと Web プレビューを表示できます。

REST API

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

開発ノート

  • ソースモジュール:src/hailo10h_lprnet/
  • Dockerfile:docker/hailo10h/lprnet.dockerfile
  • コンテナ:ghcr.io/seeed-projects/recomputer-hailo10h-cv/lprnet:latest
  • HailoRT 5.1.1 のマルチ出力エグゼキュータを使用しています。

入力と出力

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