CV / 顔ランドマーク
Face Landmarks Lite (軽量顔ランドマークモデル)
reComputer R Series (CM5 + Hailo-10H)
Hailo-10H 搭載の reComputer CM5 で動作する MediaPipe Face Landmarks Lite(0.6M パラメータ、972 FPS)。
78 ダウンロード
サイズ
1.8 MBメモリ
4GB+精度
Hailo HEF / HailoRT使用しているデバイスを選択してください。セットアップガイドとドキュメントがそれに応じて更新されます。
はじめる
デプロイ
sudo docker run --rm \
--name pi5-hailo-face-landmarks \
--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/face_landmarks_lite:latest \
python web_detection.py --model_path model/face_landmarks_lite.hef --video_path video/test.mp4REST API
REST API を使用して推論を実行します。以下のコマンドをコピーしてください。
Curl
curl -X POST "http://<Board_IP>:8000/api/models/face_landmarks_lite/predict" \
-F "file=@test.jpg"Python
import requests
resp = requests.post(
"http://<Board_IP>:8000/api/models/face_landmarks_lite/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(resp.json())モデル詳細
reComputer CM5 + Hailo-10H で Face Landmarks Lite を実行
MediaPipe Face Landmarks Lite(0.6M パラメータ、972 FPS)は顔のキーポイントを検出し、HailoRT を介して Hailo-10H 上で動作します。
モデル情報
| 項目 | 値 |
|---|---|
| アーキテクチャ | MediaPipe Face Landmarks |
| タスク | 顔のランドマーク検出 |
| 入力 | 192×192×3 RGB |
| 出力 | 98 個の顔キーポイント |
| パラメータ数 | 0.6M |
| FPS | 972 |
| 出典 | Hailo Model Zoo |
ハードウェアとホストの設定
| 項目 | 値 |
|---|---|
| ボード | Raspberry CM5 |
| アクセラレータ | Hailo-10H, /dev/hailo0 |
| OS | Raspberry Pi OS Bookworm, 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 --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/face_landmarks_lite:latest \
python web_detection.py --model_path model/face_landmarks_lite.hef --video_path video/test.mp4USB カメラモード
bash
sudo docker run --rm --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/face_landmarks_lite:latest \
python web_detection.py --model_path model/face_landmarks_lite.hef --camera_id 0HEF ファイル
| HEF | サイズ | 備考 |
|---|---|---|
face_landmarks_lite.hef | 1.8 MB | 顔のランドマーク検出 |
REST API
text
POST http://<Board_IP>:8000/api/models/face_landmarks_lite/predictbash
curl -X POST "http://<Board_IP>:8000/api/models/face_landmarks_lite/predict" \
-F "file=@test.jpg"| エンドポイント | メソッド | 用途 |
|---|---|---|
/ | GET | Web プレビュー画面 |
/api/models/face_landmarks_lite/predict | POST | 98 個のキーポイント(JSON) |
/api/video_feed | GET | MJPEG プレビューストリーム |
開発
- 出典:
src/hailo10h_face_landmarks_lite/ - Dockerfile:
docker/hailo10h/face_landmarks_lite.dockerfile
入力と出力
入力: 画像(192x192 RGB)。出力: 信頼度付きの 98 個の顔特徴点。