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 MB
Geheugen
4GB+
Precisie
Hailo HEF / HailoRT

Kies 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.mp4

REST 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

EigenschapWaarde
ArchitectuurMediaPipe Face Landmarks
TaakDetectie van gezichtspunten
Invoer192×192×3 RGB
Uitvoer98 gezichtspunten
Parameters0.6M
FPS972
BronHailo Model Zoo

Hardware- en hostinstellingen

OnderdeelWaarde
BordRaspberry CM5
VersnellerHailo-10H, /dev/hailo0
BesturingssysteemRaspberry Pi OS Bookworm, aarch64
bash
sudo apt update && sudo apt install hailo-h10-all -y
sudo reboot

hailortcli fw-control identify
ls /dev/hailo0

Uitvoeren 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.mp4

USB-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 0

HEF-bestanden

HEFGrootteOpmerkingen
face_landmarks_lite.hef1.8 MBDetectie van gezichtspunten

REST-API

text
POST http://<Board_IP>:8000/api/models/face_landmarks_lite/predict
bash
curl -X POST "http://<Board_IP>:8000/api/models/face_landmarks_lite/predict" \
  -F "file=@test.jpg"
EndpointMethodeDoel
/GETWebvoorbeeldinterface
/api/models/face_landmarks_lite/predictPOST98 punten (JSON)
/api/video_feedGETMJPEG-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.