Face detection
SCRFD-10G with landmarks
InsightFace's accurate face detector: faces and five landmarks, strong on small and crowded faces. Non-commercial research only.
About this model
SCRFD finds every face in a photo and marks five points on each one: both eyes, the tip of the nose and the corners of the mouth. The 10G version (about 10 GFLOPs at 640 x 480, 4.2 million parameters) is the detector InsightFace ships in its default buffalo_l face-analysis pack.
InsightFace reports WIDER FACE validation AP of 95.40 / 94.01 / 82.80 (easy / medium / hard) for SCRFD_10G_KPS, well above RetinaFace MobileNet-0.25, especially on small faces.
What you can build
- Count faces in crowds and group photos
- Find faces for recognition, with landmarks to align them
- Research and prototypes where accuracy matters more than size
People laughing
f16State Library and Archives of Florida, Public domain, https://commons.wikimedia.org/wiki/File:People_laughing_at_a_dinner_(4563388022).jpg
27 faces on the Apple Neural Engine (FP16 pack), score 0.5 or more, duplicates removed at IoU 0.4: 0.91 at [301, 250, 353, 316] 0.90 at [96, 273, 143, 335] 0.89 at [46, 98, 72, 130] 0.87 at [233, 134, 266, 180] 0.86 at [52, 46, 73, 75] 0.86 at [182, 30, 203, 58] 0.86 at [452, 54, 478, 88] 0.86 at [506, 13, 527, 39] 0.85 at [90, 71, 118, 102] 0.84 at [433, 131, 466, 178] 0.84 at [518, 291, 571, 363] 0.84 at [397, 15, 420, 46] 0.83 at [154, 46, 177, 74] 0.83 at [0, 138, 26, 179] 0.83 at [395, 88, 426, 132] 0.82 at [22, 63, 46, 93] 0.81 at [310, 114, 339, 146] 0.81 at [221, 6, 242, 32] 0.81 at [136, 12, 155, 35] 0.81 at [330, 48, 356, 81] 0.80 at [452, 8, 478, 39] 0.77 at [93, 21, 116, 50] 0.70 at [24, 5, 43, 29] 0.68 at [259, 0, 277, 16] 0.65 at [302, 69, 332, 104] 0.64 at [183, 0, 199, 17] 0.55 at [0, 26, 12, 51]
Students campus
f16Lusanda Madikane, CC0, https://commons.wikimedia.org/wiki/File:Xhosa_Students_Association_Students_from_UFS_Bloemfontein_Campus.jpg
30 faces on the Apple Neural Engine (FP16 pack), score 0.5 or more, duplicates removed at IoU 0.4: 0.87 at [567, 659, 589, 687] 0.86 at [434, 663, 458, 692] 0.86 at [553, 580, 572, 603] 0.86 at [199, 657, 225, 687] 0.85 at [497, 664, 521, 694] 0.85 at [770, 688, 795, 720] 0.85 at [631, 652, 653, 681] 0.85 at [724, 680, 749, 709] 0.83 at [688, 562, 710, 585] 0.83 at [795, 549, 814, 573] 0.83 at [296, 577, 316, 603] 0.83 at [434, 575, 453, 599] 0.83 at [163, 587, 183, 613] 0.82 at [270, 659, 296, 690] 0.81 at [38, 584, 61, 612] 0.81 at [373, 572, 393, 596] 0.81 at [234, 578, 254, 605] 0.80 at [67, 600, 88, 624] 0.78 at [807, 672, 829, 700] 0.78 at [129, 575, 149, 602] 0.78 at [347, 657, 368, 686] 0.76 at [458, 557, 477, 581] 0.74 at [622, 568, 642, 593] 0.73 at [601, 570, 620, 595] 0.72 at [523, 562, 541, 584] 0.71 at [570, 564, 587, 584] 0.70 at [495, 563, 516, 590] 0.67 at [330, 568, 347, 587] 0.66 at [89, 590, 106, 613] 0.53 at [246, 557, 263, 578]
Astronaut crew portrait
f16Adam Cuerden, Public domain, https://commons.wikimedia.org/wiki/File:Portrait_of_ASTP_crews_-_restoration.jpg
5 faces on the Apple Neural Engine (FP16 pack), score 0.5 or more, duplicates removed at IoU 0.4: 0.87 at [314, 141, 369, 215] 0.87 at [689, 323, 752, 406] 0.86 at [607, 178, 663, 250] 0.86 at [209, 339, 268, 426] 0.84 at [461, 321, 522, 399]
Variants & downloads
Choose the build for your appModel files are hosted on Google Drive. Large files may open a confirmation page before downloading.
Standard
SlabWeights stored in FP16: half the size of FP32, the same faces.
Platforms: macos · android
scrfd-10g-kps-f16.slab
9.6 MB · Hosted download
SHA-256 checksum
5d3c905b963ef26046c7c6cac4545aceeac0038c78110fc5e5474da58d24b533NOTICE-InsightFace.txt
858 B
SHA-256 checksum
315af4c30e64f40f286f7e7fdb886db291714833fb6ae4491284689f70cbc337Conversion details
- command
- curl -LO https://github.com/deepinsight/insightface/releases/download/v0.7/buffalo_l.zip && unzip -p buffalo_l.zip det_10g.onnx > model.onnx echo face > labels.txt slab-load convert model.onnx model.slab --input input.1=1x3x640x640 --meta task=detect --meta resize=letterbox --meta letterbox_align=top_left --meta letterbox_pad:i64=0 --meta color=rgb --meta normalize=raw255 --meta mean:f32=127.5,127.5,127.5 --meta std:f32=128,128,128 --meta decode=scrfd --meta labels:labels=@labels.txt slab-load quantize model.slab scrfd-10g-kps-f16.slab --f16 slab-load meta set scrfd-10g-kps-f16.slab default_backend.macos=npu
Integration examples
Python
python
import slab
cfg = slab.Config(cache_dir="/tmp/slab_cache", license=open("license.slablic.txt").read())
session = slab.Session(cfg, "scrfd-10g-kps-f16.slab", warmup=True)
out = session.run(slab.Input(frame=slab.Frame.open("photo.jpg")))
for b in out.boxes(score_threshold=0.5, iou_threshold=0.4):
print(round(b.score, 2), b.x1, b.y1, b.x2, b.y2, b.landmarks)
Device & backend compatibility
Pack default: macos / NPU. Fastest on the Mac (about 6 ms per frame), with the same faces as the CPU.
| Platform | Engine | Status | Precision |
|---|---|---|---|
| apple | CPU CPU | Supported Measured on macOS. | f32 |
| apple | Metal GPU | Supported Measured on macOS. | f32 |
| apple | Apple Neural Engine NPU | Supported Measured on macOS. The default. The Neural Engine computes in FP16. | f16 |
| android | CPU CPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
| android | Vulkan GPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. | f32 |
| android | Qualcomm Hexagon NPU (QNN) NPU | Supported Measured on a Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2, Adreno 740), Android 17. The NPU computes in FP16 (the int8 pack's weights are widened to FP16). | f16 |
Performance
Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.
Mac with Apple M1 Max
Slab · CPU
macOS 26.6.2
53.5 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing included: 54.16 ms median.
Mac with Apple M1 Max
Slab · GPU
macOS 26.6.2
6.3 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing included: 7.13 ms median.
Mac with Apple M1 Max
Slab · NPU
macOS 26.6.2
5.9 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing included: 6.19 ms median.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · CPU
Android 17
621.0 ms
Measured time · scope below
Median of 19 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 605 ms median. open_ms: opening the session. Peak memory (resident) after the runs: 189 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · GPU
Android 17
89.5 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, letterboxing and decoding boxes included: 90.5 ms median. open_ms: opening the session with the GPU programs already in the cache folder (the first open on a device compiles them, about 0.3 s more). Peak memory (resident) after the runs: 96 MB.
Samsung Galaxy S23 Ultra (Snapdragon 8 Gen 2)
Slab · NPU
Android 17
9.3 ms
Measured time · scope below
Median of 100 warm runs of the model (Slab's run time). From a 1920 x 1080 photo, preprocessing on the CPU included: 18.5 ms median. open_ms: opening the session, including preparing the model for the Hexagon NPU. Peak memory (resident) after the runs: 85 MB.
Accuracy checks
macos · CPU · f16
InsightFace's own SCRFD code (detection/scrfd/tools/scrfd.py) on ONNX Runtime with its letterbox, decoding and NMS (score 0.5, NMS IoU 0.4); boxes mapped back to the photo with the resize ratio and clipped to it, as Slab does (InsightFace divides by the truncated height ratio, up to a pixel different), 41 public-domain and CC0 photos with faces (Wikimedia Commons); a face matches with IoU 0.5 or more; landmark error is the mean distance of the five points as a share of the face box's diagonal
With Slab preprocessing and decoding: 294 of 294 faces matched (mean IoU 0.998), 0 extra, landmark error 0.05%. InsightFace's preprocessing and decoding around Slab's network: 294 of 294 matched (mean IoU 1.000), 0 extra, landmark error 0.00%, largest score difference 0.001.
macos · GPU · f16
InsightFace's own SCRFD code (detection/scrfd/tools/scrfd.py) on ONNX Runtime with its letterbox, decoding and NMS (score 0.5, NMS IoU 0.4); boxes mapped back to the photo with the resize ratio and clipped to it, as Slab does (InsightFace divides by the truncated height ratio, up to a pixel different), 41 public-domain and CC0 photos with faces (Wikimedia Commons); a face matches with IoU 0.5 or more; landmark error is the mean distance of the five points as a share of the face box's diagonal
With Slab preprocessing and decoding: 294 of 294 faces matched (mean IoU 0.998), 0 extra, landmark error 0.05%. InsightFace's preprocessing and decoding around Slab's network: 294 of 294 matched (mean IoU 1.000), 0 extra, landmark error 0.00%, largest score difference 0.001.
macos · NPU · f16
InsightFace's own SCRFD code (detection/scrfd/tools/scrfd.py) on ONNX Runtime with its letterbox, decoding and NMS (score 0.5, NMS IoU 0.4); boxes mapped back to the photo with the resize ratio and clipped to it, as Slab does (InsightFace divides by the truncated height ratio, up to a pixel different), 41 public-domain and CC0 photos with faces (Wikimedia Commons); a face matches with IoU 0.5 or more; landmark error is the mean distance of the five points as a share of the face box's diagonal
With Slab preprocessing and decoding: 294 of 294 faces matched (mean IoU 0.997), 0 extra, landmark error 0.06%. InsightFace's preprocessing and decoding around Slab's network: 294 of 294 matched (mean IoU 0.999), 0 extra, landmark error 0.02%, largest score difference 0.008.
android · NPU · f16
Slab's CPU engine (FP32) on the same 1920 x 1080 photo
Cosine similarity of the output with the CPU's: 0.99987.
Before you choose this model
- Non-commercial research use only (see License).
- Finds faces only; it does not tell who a person is.
- About three times slower than RetinaFace MobileNet-0.25 and 10 MB as FP16.
- Works on a fixed 640 x 640 letterbox, so tiny faces in very large photos can be missed.