A face detector once restored a toddler's pants
During early testing, the face detector reported a confident detection on a family snapshot and the pipeline dutifully “restored” it — except the detection was a toddler's corduroy pants. The fabric folds read as a face to the detector, and the face model then repainted them as one. The failure taught us that on old photographs, detector confidence alone is not a usable signal, and it produced the geometric gate every candidate face must now pass. This revision adds the other half of the story, measured: how small a face the detector can find at all. The floor sits between 14 and 20 letterboxed pixels — and the famous 1927 Solvay Conference photograph, whose 29 faces stand at 21–27 px, clears it with every single attendee found.
Every number in this note was measured on the production pipeline code — same models, same math. Raw per-image records: e5_detect.json.
1 · Why old photos break face detectors
Detectors are trained mostly on modern, well-exposed images. Old scans present textures the training set rarely contains: fabric weave, lace, foliage, water damage, and grain — all capable of producing high-confidence false detections. They also present the opposite problem: real faces that are small, faded, and low-contrast. A confidence threshold alone cannot separate the two, because the false positives frequently score higher than the real small faces. Our detector is SCRFD-2.5G[1], decoded 1:1 from the FaceFusion reference implementation[2]: the photo is letterboxed into a 640×640 input, and each candidate comes back with a box, five landmarks, and a confidence score.
2 · The gate
Instead of trusting the score, we test whether the detection's landmarks are arranged like a face — cheap arithmetic on the eye and mouth points:
| Rule | Threshold | What it rejects |
|---|---|---|
| Detector confidence | ≥ 0.55 | Marginal detections not worth testing further. |
| Eye spacing vs. box width | 0.25 – 0.75 | Landmark clusters too tight or too wide to be two eyes in a face-sized box — the typical geometry of fabric-fold false positives. |
| Mouth below the eyes | by ≥ 0.2 × eye distance | Upside-down and scrambled landmark arrangements. |
The thresholds are deliberately loose — they describe any plausible human face, including tilted and three-quarter views, while excluding arrangements no face can have. Since the gate shipped, the pants class of failure has not recurred on our test photos.
3 · New: the detection floor, measured

The Solvay result lands exactly where the ladder predicts, on the good side: all 29 of 29 attendees detected at whole-frame scale, confidence 0.734–0.864, every one surviving the geometric gate. And a control worth publishing because it is counter-intuitive: naively tiling the same photo 2×2 — more pixels per face — finds only 27 of 29. Two faces straddle tile boundaries and are seen whole by neither tile; a 3×3 grid happens to cut elsewhere and recovers all 29. That asymmetry is why the browser engine's small-face pass detects on the full frame and on overlapping quadrants, merging candidates by intersection-over-union — tiled detection needs overlap, not just resolution.
The practical reading for group photos: a face smaller than roughly 3% of the photo's long edge is invisible to the detector. Crop tighter before you restore — the same pixels come back through the letterbox bigger, on the safe side of the cliff — and see the face-rendering note for what happens to small faces after detection.
4 · Limitations
A geometric gate can only reject impossible arrangements. A false positive that happens to be face-shaped — a doll, a statue, a portrait on a wall — passes, and arguably should, since restoring it is harmless. The gate's job is narrow: never again repaint someone's clothing as a face. The floor measurements are one portrait and one group photo — enough to locate the cliff between 14 and 20 px, not to map its exact shape across poses and lighting; and confidence between 20 and 28 px is noticeably noisier than above, so faces in that band should be considered at-risk rather than safe.
References
- Guo, J., Deng, J., Lattas, A., & Zafeiriou, S. (2021). Sample and Computation Redistribution for Efficient Face Detection. arXiv:2105.04714. arxiv.org
- FaceFusion (open-source face processing platform) — the reference implementation our SCRFD decode and model preprocessing are ported from, 1:1. github.com
- Couprie, B. (1927). Photograph of the Fifth Solvay International Conference — 29 attendees, the densest concentration of physics Nobel laureates ever photographed. Public domain, via Wikimedia Commons. commons.wikimedia.org
- Lange, D. (1936). “Migrant Mother” (Destitute pea pickers in California), Farm Security Administration. Public domain, via Wikimedia Commons. commons.wikimedia.org
- ONNX Runtime — the inference engine both our server (CPU) and in-browser (WebGPU/WASM) engines run on. onnxruntime.ai