CV / ArcFace
ArcFace MobileFaceNet
ArcFace with MobileFaceNet backbone extracts 512-dim face embeddings for face verification and identification through HailoRT inference.
2 downloads
Grootte
2.5 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 cm5-hailo-arcface \
--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/arcface_mobilefacenet:latest \
python web_detection.py --model_path model/arcface_mobilefacenet.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/arcface_mobilefacenet/predict" \
-F "file=@face.jpg"Python
import requests
resp = requests.post(
"http://<Board_IP>:8000/api/models/arcface_mobilefacenet/predict",
files={"file": open("face.jpg", "rb")},
timeout=30,
)
print(resp.json())Modeldetails
ArcFace MobileFaceNet on reComputer CM5 + Hailo-10H
ArcFace + MobileFaceNet (2.04M params, 99.4% LFW) for face recognition, running on Hailo-10H.
Model Info
| Property | Value |
|---|---|
| Architecture | ArcFace + MobileFaceNet |
| Task | Face Recognition |
| Input | 112×112×3 RGB |
| Output | 512-dim embedding |
| Parameters | 2.04M |
| LFW Accuracy | 99.4% |
| Source | Hailo Model Zoo |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | Raspberry Pi CM5 |
| Accelerator | Hailo-10H, /dev/hailo0 |
| OS | Raspberry Pi OS Bookworm, aarch64 |
bash
sudo apt update && sudo apt install hailo-h10-all -y
sudo rebootRun
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/arcface_mobilefacenet:latest \
python web_detection.py --model_path model/arcface_mobilefacenet.hef --video_path video/test.mp4HEF Files
| HEF | Size | Notes |
|---|---|---|
arcface_mobilefacenet.hef | 2.5 MB | Face embedding model |
REST API
Extract Embedding
bash
curl -X POST "http://<Board_IP>:8000/api/models/arcface_mobilefacenet/predict" \
-F "file=@face.jpg"The response contains a 512-dimensional embedding and its dimension. Face comparison is performed by the client; this service does not expose a separate compare endpoint.
Development
- Source:
src/hailo10h_arcface_mobilefacenet/ - Dockerfile:
docker/hailo10h/arcface_mobilefacenet.dockerfile
Invoer en uitvoer
Input: image (112x112 RGB). Output: 512-dim face embedding vector.