The fast face detector is based on the work Aggregate channel features for multi-view face detection proposed by Bin Yang, Junjie Yan, Zhen Lei and Stan Z. Li. My version extends the aforementioned one by adding a new channel: the integral image. This innovation makes the detector very robust with respect to the Viola Jones (VJ) detector. We tested FFD and VJ on 3547 images by obtaining the following results:
Detector | True Positive | False Positive | No Detection | Precision |
---|---|---|---|---|
FFD | 3059 | 488 | 0 | 86.24% |
VJ | 2417 | 896 | 344 | 68.14% |
- OpenCV
- OpenMP
- SSE
- Boost
FPD works under Linux and Mac Os environments. I recommend a so-called out of source build which can be achieved by the following command sequence:
- mkdir build
- cd build
- cmake ../
- make -j<number-of-cores+1>
###MATLAB - Training
- Compile the cpp files by launching:
compile_mex_files.m;
- Create a folder train and three subfolders, namely:
- posGt: containing one txt file for each positive image. Each file contains the coordinates of each face in the image in the following format: #x #y #w #h
- pos_jpg: containing the positive samples
- neg_jpg: containing the negative
- Launch the training file:
train;
###C++ - Detection Go to the bin diretory and launch the program with the following command:
./ffd ../detector/detector.xml /path/to/the/image.jpg
The detector is already trained with the complete AFW dataset. So, you can directly use the xml file inside the detector folder.