CV / Gezichtsherkenningspunten
Face Landmarks Lite (Lichtgewicht model voor gezichtsherkenningspunten)
reComputer R Series (CM5 + Hailo-10H)
MediaPipe Face Landmarks Lite (0.6M parameters, 972 FPS) op reComputer CM5 met Hailo-10H.
77 downloads
Grootte
1.8 MBGeheugen
4GB+Precisie
Hailo HEF / HailoRTKies het apparaat dat je gebruikt. De installatiehandleiding en documentatie worden dienovereenkomstig bijgewerkt.
Aan de slag
Implementeren
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
Gebruik de REST API om inferentie uit te voeren. Kopieer de onderstaande commando's.
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())Modeldetails
Face Landmarks Lite op reComputer CM5 + Hailo-10H
MediaPipe Face Landmarks Lite (0.6M parameters, 972 FPS) detecteert gezichtspunten en draait via HailoRT op Hailo-10H.
Modelinformatie
| Eigenschap | Waarde |
|---|---|
| Architectuur | MediaPipe Face Landmarks |
| Taak | Detectie van gezichtspunten |
| Invoer | 192×192×3 RGB |
| Uitvoer | 98 gezichtspunten |
| Parameters | 0.6M |
| FPS | 972 |
| Bron | Hailo Model Zoo |
Hardware- en hostinstellingen
| Onderdeel | Waarde |
|---|---|
| Bord | Raspberry CM5 |
| Versneller | Hailo-10H, /dev/hailo0 |
| Besturingssysteem | Raspberry Pi OS Bookworm, aarch64 |
bash
sudo apt update && sudo apt install hailo-h10-all -y
sudo reboot
hailortcli fw-control identify
ls /dev/hailo0Uitvoeren met demovideo
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-cameramodus
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-bestanden
| HEF | Grootte | Opmerkingen |
|---|---|---|
face_landmarks_lite.hef | 1.8 MB | Detectie van gezichtspunten |
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"| Endpoint | Methode | Doel |
|---|---|---|
/ | GET | Webvoorbeeldinterface |
/api/models/face_landmarks_lite/predict | POST | 98 punten (JSON) |
/api/video_feed | GET | MJPEG-voorbeeldstream |
Ontwikkeling
- Bron:
src/hailo10h_face_landmarks_lite/ - Dockerfile:
docker/hailo10h/face_landmarks_lite.dockerfile
Invoer en uitvoer
Invoer: afbeelding (192x192 RGB). Uitvoer: 98 gezichtspunten met betrouwbaarheid.