Repository navigation
Conversation
- Generate SCRFD output images for blur, boxes, mosaic, and draw-scores - Update README header to 3-column comparison: Original vs CenterFace vs SCRFD - Add side-by-side CenterFace vs SCRFD comparisons for boxes, mosaic, and scores
- Remove "higher recall" and "legacy" claims from README - Add CenterFace WIDER FACE numbers to benchmark table - Replace SCRFD-2.5G row with CenterFace row for fair comparison - Change image comparison headers from "CenterFace (legacy)" to "CenterFace"
nick8592
force-pushed
the
feature/scrfd-detector
branch
from
August 26, 2026 07:31
a1bc402 to
4337a5c
Compare
SCRFD paper only reports validation set (95.16/93.87/83.05), not test set. CenterFace val-set numbers are 93.5/92.4/87.5 (from arXiv:1911.03599). Previous table mixed SCRFD val numbers with CenterFace test numbers (93.2/92.1/87.3), which is an apples-to-oranges comparison. Add footnote citing sources and resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add SCRFD (Sample and Computation Redistribution for Face Detection) as an alternative face detection backend, selectable via a
--detectorCLI flag. CenterFace remains available and unchanged.Motivation
Offering a choice of detector backends lets users pick the best option for their use case. SCRFD is a more recent model (ICLR 2022) with an active upstream (InsightFace), while CenterFace remains a proven, lightweight option.
Changes
deface/scrfd.py— SCRFD detector class with same(dets, lms)interface as CenterFacedeface/scrfd_10g.onnx— SCRFD 10GFlops ONNX model (17MB, from InsightFace buffalo_l pack)examples/city_anonymized_*_scrfd.jpg— SCRFD example outputs for README comparisondeface/deface.py— Add--detector {centerface,scrfd}CLI flag (default:scrfd), renamecenterfaceparam todetectorpyproject.toml— Includescrfd_10g.onnxin package datadeface.spec— Includescrfd_10g.onnxin PyInstaller datasREADME.md— SCRFD section, detector comparison table, side-by-side example imagesHow it works
SCRFD uses an FPN architecture with distance-based bounding box and keypoint decoding (3 FPN strides: 8, 16, 32; 2 anchors per location; 5 keypoints). The bundled
scrfd_10g.onnxis the 10GFlops variant from the InsightFacebuffalo_lmodel pack, trained on the WIDER FACE dataset.Testing
--detector centerface)test_examples.shpassesexamples/city.jpgBenchmark comparison (WIDER FACE validation set mAP)
SCRFD numbers from arXiv:2105.04714 Table 4 (VGA 640×480). CenterFace numbers from arXiv:1911.03599.
Backward compatibility
--detector centerfacerestores the original CenterFace behaviorcenterface.pyuntouchedget_anonymized_image()now uses SCRFD by default (same public API)Credits