Face detection that fits in a megabyte
A face detector built for edge devices where model size and compute are strictly rationed.

What it does
Ultra-Light-Fast-Generic-Face-Detector-1MB is a face detection network designed for edge computing devices. The default FP32 PyTorch model is roughly 1.04–1.1 MB, and an INT8-quantized version shrinks to about 300 KB. It comes in two flavors: version-slim, which trims the backbone for speed, and version-RFB, which uses a modified Receptive Field Block to squeeze out extra accuracy.
The interesting bit
The repo ships ready-made export formats—ONNX, Caffe, NCNN, and MNN—alongside C++ and Python inference code for ARM and RISC-V runtimes. WIDER FACE benchmarks show the RFB variant outperforming libfacedetection and Retinaface-Mobilenet-0.25 on the Hard set at 320×240, while the slim variant clocks roughly 9.5 ms on a quad-core Raspberry Pi 4B.
Key highlights
- Two variants:
version-slim(faster, smaller backbone) andversion-RFB(higher accuracy). - FP32 model size of ~1.04–1.1 MB; INT8 quantized models around ~300 KB.
- About 90–109 MFlops for 320×240 inputs.
- Pre-converted models and inference examples for NCNN, MNN, Caffe, and OpenCV DNN.
- Benchmarked on Raspberry Pi 4B, iPhone 6s Plus, and Kendryte K210.
Caveats
- The README itself warns that benchmark results “may be partially inconsistent.”
- The listed training environment is aging: Python 3.6, PyTorch 1.2, and CUDA 10.0.
- The TODO list still includes adding test data, so the repo feels slightly unfinished.
Verdict Grab it if you need a sub-megabyte face detector for an embedded ARM or RISC-V board and can live with trade-offs in accuracy. Look elsewhere if you need top-tier precision on high-resolution images or a modern training stack.
Frequently asked
- What is Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB?
- A face detector built for edge devices where model size and compute are strictly rationed.
- Is Ultra-Light-Fast-Generic-Face-Detector-1MB open source?
- Yes — Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB is open source, released under the MIT license.
- What language is Ultra-Light-Fast-Generic-Face-Detector-1MB written in?
- Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB is primarily written in Python.
- How popular is Ultra-Light-Fast-Generic-Face-Detector-1MB?
- Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB has 7.5k stars on GitHub.
- Where can I find Ultra-Light-Fast-Generic-Face-Detector-1MB?
- Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB is on GitHub at https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB.