An open source library for face detection in images. The face detection speed can reach 1000FPS.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
This is an open source library for CNN-based face detection in images. The CNN model has been converted to static variables in C source files. The source code does not depend on any other libraries. What you need is just a C++ compiler. You can compile the source code under Windows, Linux, ARM and any platform with a C++ compiler.
SIMD instructions are used to speed up the detection. You can enable AVX2 if you use Intel CPU or NEON for ARM.
The model file has also been provided in directory ./models/.
examples/detect-image.cpp and examples/detect-camera.cpp show how to use the library.
The library was trained by libfacedetection.train.
You can copy the files in directory src/ into your project, and compile them as the other files in your project. The source code is written in standard C/C++. It should be compiled at any platform which supports C/C++.
You can also compile the source code to a static or dynamic library, and then use it in your project.
| Method |Time | FPS |Time | FPS | |--------------------|--------------|-------------|--------------|-------------| | | X64 |X64 | X64 |X64 | | |Single-thread |Single-thread|Multi-thread |Multi-thread | |cnn (CPU, 640x480) | 58.03ms | 17.23 | 13.85ms | 72.20 | |cnn (CPU, 320x240) | 14.18ms | 70.51 | 3.38ms | 296.21 | |cnn (CPU, 160x120) | 3.25ms | 308.15 | 0.82ms | 1226.56 | |cnn (CPU, 128x96) | 2.11ms | 474.38 | 0.52ms | 1929.60 |
(To be updated)
|cnn (CPU, 640x480)||512.04ms||1.95||174.89ms||5.72|
|cnn (CPU, 320x240)||123.47ms||8.10||42.13ms||23.74|
|cnn (CPU, 160x120)||27.42ms||36.47||9.75ms||102.58|
|cnn (CPU, 128x96)||17.78ms||56.24||6.12ms||163.50|
Run on default settings: scales=[1.], confidence_threshold=0.3, floating point:
AP_easy=0.849, AP_medium=0.816, AP_hard=0.601
All contributors who contribute at GitHub.com are listed here.
The contributors who were not listed at GitHub.com: * Jia Wu (吴佳) * Dong Xu (徐栋) * Shengyin Wu (伍圣寅)
The work is partly supported by the Science Foundation of Shenzhen (Grant No. 20170504160426188).