CV / LightFace
LightFace Slim
LightFace Slim (Ultra-Light-Fast-Generic-Face-Detector-1MB) performs real-time face detection with bounding boxes through HailoRT inference. 817 FPS, ideal for edge deployment.
2 downloads
Size
616 KBMemory
4GB+Precision
Hailo HEF / HailoRTChoose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
Deploy
sudo docker run --rm \
--name cm5-hailo-lightface \
--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/lightface_slim:latest \
python web_detection.py --model_path model/lightface_slim.hef --video_path video/test.mp4REST API
Use the REST API to run inference. Copy the commands below.
Curl
curl -X POST "http://<Board_IP>:8000/api/models/lightface_slim/predict" \
-F "file=@test.jpg"Python
import requests
resp = requests.post(
"http://<Board_IP>:8000/api/models/lightface_slim/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(resp.json())Model Details
LightFace Slim on reComputer R Series (CM5 + Hailo-10H)
Ultra-lightweight face detection (0.26M params, 817 FPS) running on Hailo-10H via HailoRT.
This page targets reComputer R Series (CM5 + Hailo-10H) with a PCIe Hailo-10H accelerator.
Model Info
| Property | Value |
|---|---|
| Architecture | Ultra-Light-Fast-Generic-Face-Detector-1MB |
| Task | Face Detection |
| Input | 240×320×3 RGB |
| Output | Face bounding boxes with confidence |
| Parameters | 0.26M |
| FPS | 817 |
| Source | Hailo Model Zoo |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-10H over PCIe, /dev/hailo0 |
| OS | Raspberry Pi OS Bookworm, aarch64 |
bash
sudo apt update && sudo apt install hailo-h10-all -y
sudo reboot
hailortcli fw-control identify
ls /dev/hailo0Run 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/lightface_slim:latest \
python web_detection.py --model_path model/lightface_slim.hef --video_path video/test.mp4USB 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/lightface_slim:latest \
python web_detection.py --model_path model/lightface_slim.hef --camera_id 0HEF Files
| HEF | Size | Notes |
|---|---|---|
lightface_slim.hef | 616 KB | Face detection model |
REST API
text
POST http://<Board_IP>:8000/api/models/lightface_slim/predictbash
curl -X POST "http://<Board_IP>:8000/api/models/lightface_slim/predict" \
-F "file=@test.jpg"| Endpoint | Method | Purpose |
|---|---|---|
/ | GET | Web preview UI |
/api/models/lightface_slim/predict | POST | Face boxes (JSON) |
/api/video_feed | GET | MJPEG preview stream |
Development
- Source:
src/hailo10h_lightface_slim/ - Dockerfile:
docker/hailo10h/lightface_slim.dockerfile
Inputs and Outputs
Input: image (240x320 RGB). Output: face bounding boxes with confidence scores.