CV / Face Landmarks

Face Landmarks Lite

Face Landmarks Lite detects 98 facial keypoints with contour connections through HailoRT inference, ideal for face tracking and AR applications.

2 downloads
Size
1.8 MB
Memory
4GB+
Precision
Hailo HEF / HailoRT

Choose the device you're using, the set up guide and documentation will update accordingly.

Getting Started

Deploy
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

Use the REST API to run inference. Copy the commands below.

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

Model Details

Face Landmarks Lite on reComputer CM5 + Hailo-10H

MediaPipe Face Landmarks Lite (0.6M params, 972 FPS) for facial keypoint detection, running on Hailo-10H via HailoRT.

Model Info

PropertyValue
ArchitectureMediaPipe Face Landmarks
TaskFacial Landmark Detection
Input192×192×3 RGB
Output98 facial keypoints
Parameters0.6M
FPS972
SourceHailo Model Zoo

Hardware and Host Setup

ItemValue
BoardRaspberry CM5
AcceleratorHailo-10H, /dev/hailo0
OSRaspberry Pi OS Bookworm, aarch64
bash
sudo apt update && sudo apt install hailo-h10-all -y
sudo reboot

hailortcli fw-control identify
ls /dev/hailo0

Run With Demo Video

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 Camera Mode

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 Files

HEFSizeNotes
face_landmarks_lite.hef1.8 MBFacial landmark detection

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"
EndpointMethodPurpose
/GETWeb preview UI
/api/models/face_landmarks_lite/predictPOST98 keypoints (JSON)
/api/video_feedGETMJPEG preview stream

Development

  • Source: src/hailo10h_face_landmarks_lite/
  • Dockerfile: docker/hailo10h/face_landmarks_lite.dockerfile

Inputs and Outputs

Input: image (192x192 RGB). Output: 98 facial keypoints with confidence.