CoolFace
Modelpublic

mudler/face-detect-gguf

sourceHugging Faceotherupdated 3mo agoView on Hugging Face
2likes17kdownloads
Model Card

face-detect-gguf

GGUF model packs for the `face-detect` backend of LocalAI.

Each .gguf here is a self-contained, metadata-driven pack (detector + recognizer, plus genderage / anti-spoof heads when the source provides them) produced by face-detect.cpp, a standalone C++/ggml port of the insightface and OpenCV-Zoo face pipelines. No Python or ONNX runtime is needed at inference time: the GGUF carries the weights verbatim plus the forward-graph topology in its KV metadata, and the C++ engine replays it.

  • Source code commit: e22260d5d5490b37b021b7f795079f386d553afd (face-detect.cpp)
  • Format: GGUF, general.architecture = "facedetect"
  • Dtype: all packs published as f16 (near-lossless canonical; see parity below)
  • Consumed by: LocalAI face-detect backend

License - read before use

The packs in this repo carry two different licenses depending on their source weights. Pick the pack that matches your use case.

PackSourceLicenseCommercial use
buffalo_l.ggufinsightface buffalo_lNon-commercial, research-onlyNo
buffalo_m.ggufinsightface buffalo_mNon-commercial, research-onlyNo
buffalo_s.ggufinsightface buffalo_sNon-commercial, research-onlyNo
buffalo_sc.ggufinsightface buffalo_scNon-commercial, research-onlyNo
antelopev2.ggufinsightface antelopev2Non-commercial, research-onlyNo
yunet-sface.ggufOpenCV-Zoo YuNet + SFaceApache-2.0Yes
The insightface buffalo packs (SCRFD + ArcFace) are released by insightface for NON-COMMERCIAL research purposes only. They are redistributed here as derived GGUF artifacts under those same upstream terms. If you need a commercial-friendly option, use `yunet-sface.gguf` (Apache-2.0).

Models

buffalo_l.gguf - SCRFD det_10g + ArcFace ResNet50 (512-d)

The primary, highest-accuracy insightface pack. SCRFD det_10g detector + ArcFace w600k_r50 (IResNet50) recognizer producing a 512-d embedding, plus the genderage head and the MiniFASNet anti-spoof ensemble (V2@2.7 + V1SE@4.0, 80x80) bundled in. License: non-commercial / research-only.

buffalo_m.gguf - SCRFD det_2.5g + ArcFace ResNet50 (512-d)

Mid-size insightface pack. SCRFD det_2.5g detector + ArcFace w600k_r50 512-d recognizer (+ genderage + anti-spoof when present). The det_2.5g topology is replayed through the metadata-driven graph interpreter. License: non-commercial / research-only.

buffalo_s.gguf - SCRFD det_500m + ArcFace MobileFaceNet (512-d)

Smallest insightface pack. SCRFD det_500m detector + ArcFace MobileFaceNet (w600k_mbf) 512-d recognizer (+ genderage + anti-spoof when present). Both the det_500m detector and the MobileFaceNet recognizer are replayed metadata-driven. License: non-commercial / research-only.

buffalo_sc.gguf - SCRFD det_500m + a small ArcFace (512-d)

The compact detect-plus-recognize insightface pack. SCRFD det_500m detector + a small ArcFace embedder producing a 512-d embedding, detection and recognition only (no genderage / anti-spoof heads). License: non-commercial / research-only.

antelopev2.gguf - SCRFD det_10g + ArcFace ResNet100 glint360k (512-d)

The highest-accuracy insightface pack. SCRFD det_10g detector + ArcFace ResNet100 trained on glint360k, producing a 512-d embedding. License: non-commercial / research-only.

yunet-sface.gguf - YuNet detector + SFace recognizer (128-d), Apache-2.0

The commercial-friendly alternative. OpenCV-Zoo YuNet (face_detection_yunet_2023mar) anchor-free detector + SFace (face_recognition_sface_2021dec) recognizer producing a 128-d embedding. SFace carries its (x-127.5)/128 normalization in-graph. License: Apache-2.0 (commercial use OK).

Parity

Each pack was validated against its reference pipeline (insightface for buffalo, cv2 FaceDetectorYN/FaceRecognizerSF for yunet+sface) before upload. The decode-isolated embedding gate is cosine >= 0.9999 and max|d| <= 1e-3.

PackDtypeEmbedding cosine (gate)Result
buffalo_l.gguff161.000000PASS
buffalo_m.gguff161.000000PASS
buffalo_s.gguff161.000000PASS
buffalo_sc.gguff161.000000PASS
antelopev2.gguff161.000000PASS
yunet-sface.gguff161.000000PASS

f16 quantization is applied only to the large 2-D Gemm weights (the ArcFace / SFace embedding head); every conv kernel, BN stat, bias and projection head stays F32, so f16 is near-lossless. All six packs meet the strict near-lossless bound at f16.

Usage

These packs are intended to be installed through the LocalAI model gallery (face-detect-buffalo-l / -m / -s / -sc / -antelopev2, and face-detect-yunet-sface) and run by the face-detect backend. See the LocalAI and face-detect.cpp documentation.