CV / PaddleOCR
PaddleOCR v5 Mobile Detection
Text-region detection for document images on reComputer R Series with Hailo-8 or Hailo-10H.
24 ダウンロード
サイズ
5.49 MBメモリ
4GB+精度
Hailo HEF / HailoRT使用しているデバイスを選択してください。セットアップガイドとドキュメントがそれに応じて更新されます。
はじめる
デプロイ
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モデル詳細
reComputer R Series (CM5 + Hailo-10H)PaddleOCR v5 Mobile Detection を reComputer R Series(CM5 + Hailo-10H)で実行
PaddleOCR v5 Mobile Detection は、HailoRT 5.1.1 を介して Hailo-10H 上で文書画像内のテキスト領域を検出します。DB(Differentiable Binarization)ヘッドが確率マップを出力し、領域は CPU 上で四角形ポリゴンとして抽出されます。
このページは、PCIe Hailo-10H アクセラレータを搭載した reComputer R Series(CM5 + Hailo-10H) を対象としています。
モデル情報
| 項目 | 値 |
|---|---|
| アーキテクチャ | PaddleOCR v5 Mobile(DB テキスト検出器) |
| タスク | テキスト検出 |
| 入力 | 544×960×3 |
| 出力 | テキスト領域の確率マップ → 四角形 |
| パラメータ数 | 1.2M |
| 演算量 | 6.5G |
| 精度 | 4.60 DB メトリクス(Model Zoo 参考値) |
| HEF | Hailo Model Zoo v5.4.0、Hailo-10H |
ハードウェアとホストのセットアップ
| 項目 | 値 |
|---|---|
| ボード | reComputer R Series(Raspberry Pi CM5) |
| アクセラレータ | Hailo-10H、PCIe 経由、/dev/hailo0 |
| ホストドライバ | hailo-h10-all apt パッケージ |
| ランタイム | HailoRT 5.1.1(ホストとコンテナでメジャー.マイナーを一致) |
| コンテナ内 Python | 3.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デモ動画で実行
bash
sudo docker run --rm \
--name hailo10h-paddle-ocr-detection \
--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_detection:latest \
python web_detection.py --model_path model/paddle_ocr_v5_mobile_detection.hef --video_path video/test.mp4http://<Board_IP>:8000 を開くと Web プレビューを確認できます(検出されたテキスト領域の周囲に緑の四角形)。
USB カメラモード
bash
sudo docker run --rm \
--name hailo10h-paddle-ocr-detection \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
--device /dev/video0:/dev/video0 \
-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_detection:latest \
python web_detection.py --model_path model/paddle_ocr_v5_mobile_detection.hef --camera_id 0REST API
bash
curl -X POST "http://<Board_IP>:8000/api/models/paddle_ocr_v5_mobile_detection/predict" \
-F "file=@test.png"| エンドポイント | メソッド | 用途 |
|---|---|---|
/api/models/paddle_ocr_v5_mobile_detection/predict | POST | テキスト領域ポリゴン(JSON) |
/api/video_feed | GET | MJPEG プレビューストリーム |
/api/config | GET / POST | ボックススコア/二値化しきい値 |
開発メモ
- ソースモジュール:
src/hailo10h_paddle_ocr_v5_mobile_detection/ - Dockerfile:
docker/hailo10h/paddle_ocr_v5_mobile_detection.dockerfile - コンテナ:
ghcr.io/seeed-projects/recomputer-hailo10h-cv/paddle_ocr_v5_mobile_detection:latest - DB 後処理は不変。実行部は HailoRT 5.1.1 の
create_infer_modelAPI。 - アプリケーションレベルで認識モジュールと組み合わせ、各検出領域内のテキストを読み取ります。
入力と出力
Input: full document image or demo video frame. Output: detected text-region polygons, bounding boxes, and annotated MJPEG preview.