| --- |
| license: other |
| license_name: mixed-see-model-card |
| license_link: LICENSE |
| tags: |
| - face-detection |
| - face-recognition |
| - gguf |
| - ggml |
| - localai |
| - insightface |
| - opencv-zoo |
| library_name: gguf |
| --- |
| |
| # face-detect-gguf |
|
|
| GGUF model packs for the **`face-detect`** backend of [LocalAI](https://github.com/mudler/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](https://github.com/mudler/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. |
|
|
| | Pack | Source | License | Commercial use | |
| |---|---|---|---| |
| | `buffalo_l.gguf` | insightface buffalo_l | **Non-commercial, research-only** | No | |
| | `buffalo_m.gguf` | insightface buffalo_m | **Non-commercial, research-only** | No | |
| | `buffalo_s.gguf` | insightface buffalo_s | **Non-commercial, research-only** | No | |
| | `buffalo_sc.gguf` | insightface buffalo_sc | **Non-commercial, research-only** | No | |
| | `antelopev2.gguf` | insightface antelopev2 | **Non-commercial, research-only** | No | |
| | `yunet-sface.gguf` | OpenCV-Zoo YuNet + SFace | **Apache-2.0** | Yes | |
| |
| > **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**. |
|
|
| | Pack | Dtype | Embedding cosine (gate) | Result | |
| |---|---|---:|---| |
| | `buffalo_l.gguf` | f16 | 1.000000 | PASS | |
| | `buffalo_m.gguf` | f16 | 1.000000 | PASS | |
| | `buffalo_s.gguf` | f16 | 1.000000 | PASS | |
| | `buffalo_sc.gguf` | f16 | 1.000000 | PASS | |
| | `antelopev2.gguf` | f16 | 1.000000 | PASS | |
| | `yunet-sface.gguf` | f16 | 1.000000 | PASS | |
|
|
| 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](https://github.com/mudler/LocalAI) and |
| [face-detect.cpp](https://github.com/mudler/face-detect.cpp) documentation. |
|
|