haloeffectbp/halo-face-landmarks
0
Halo Face Landmarks
FastAPI service that returns 68 facial landmarks (dlib convention) for any face photo including 90° lateral profiles. Backend for the Halo facial-analysis tool when in-browser MediaPipe can't detect a true profile.
API
GET / — health check, returns {"status": "ok"}.
POST /detect — multipart upload with field image. Returns:
{
"landmarks": [[x1, y1], [x2, y2], ..., [x68, y68]],
"width": 1024,
"height": 1024,
"count": 68
}Or { "error": "..." } with appropriate HTTP status on failure.
Privacy
Photos are processed in-memory and discarded after each request. Nothing written to disk by this code.
Model
face_alignment — FAN (Face Alignment Network) trained on 300W-LP. Profile-capable via SFD detector.
Cold start
Free CPU Spaces sleep after 48h of inactivity. First request after sleep takes 10–30 s to wake up. Warm requests are 2–5 s on a typical photo.
