CV / ArcFace

ArcFace MobileFaceNet

ArcFace with MobileFaceNet backbone extracts 512-dim face embeddings for face verification and identification through HailoRT inference.

2 descargas
Tamaño
2.5 MB
Memoria
4GB+
Precisión
Hailo HEF / HailoRT

Elige el dispositivo que estás usando. La guía de configuración y la documentación se actualizarán en consecuencia.

Primeros pasos

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

API REST

Usa la API REST para ejecutar inferencia. Copia los comandos siguientes.

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

Detalles del modelo

ArcFace MobileFaceNet on reComputer CM5 + Hailo-10H

ArcFace + MobileFaceNet (2.04M params, 99.4% LFW) for face recognition, running on Hailo-10H.

Model Info

PropertyValue
ArchitectureArcFace + MobileFaceNet
TaskFace Recognition
Input112×112×3 RGB
Output512-dim embedding
Parameters2.04M
LFW Accuracy99.4%
SourceHailo Model Zoo

Hardware and Host Setup

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

Run

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

HEF Files

HEFSizeNotes
arcface_mobilefacenet.hef2.5 MBFace 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

Entradas y salidas

Input: image (112x112 RGB). Output: 512-dim face embedding vector.