Implementations of PCN face detection is ported to iOS using caffe. PCN (caffe version) is get from: https://github.com/Jack-CV/FaceKit
- FaceKit by Jack-CV
- Real-Time Rotation-Invariant Face Detection and Tracking by Jack-CV
- Caffe-iOS by lsy17096535
- iPhone 6S+
- Camera capture preset: 640x480 (1280x720 or larger sizes)
- Below talbe is a record about quick PCN benchmarks on iPhone 6S+.
Min face size | Number of faces | FPS ~ |
---|---|---|
45 | 1 | 93-108 FPS |
45 | 2 | 57-58 FPS |
45 | 3 | 34-37 FPS |
45 | 4 | 22-23 FPS |
45 | 5 | 21-22 FPS |
Set minimum size of faces to detect (size
>= 20)
detector.SetMinFaceSize(size);
Set scaling factor of image pyramid (1.4 <= factor
<= 1.6)
detector.SetImagePyramidScaleFactor(factor);
Set score threshold of detected faces (0 <= thresh1
, thresh2
, thresh3
<= 1)
detector.SetScoreThresh(thresh1, thresh2, thresh3);
Smooth the face boxes or not (smooth = true or false, recommend using it on video to get stabler face boxes)
detector.SetVideoSmooth(smooth);
See picture.cpp and video.cpp for details. If you want to reproduce the results on FDDB, please run fddb.cpp. You can rotate the images in FDDB to get FDDB-left, FDDB-right, and FDDB-down, then test PCN on them respectively.
You can replace caffe-ios by another caffe-ios implementation to reduce speed, performance, stability,...
- Some faces are difficult to detect (this was greatly improved on the previous commit).
- XCode 10.1
- Objective-C
- C++
- OpenCV@2
- Caffe iOS
- Real-Time Rotation-Invariant Face Detection
@inproceedings{shiCVPR18pcn,
Author = {Xuepeng Shi and Shiguang Shan and Meina Kan and Shuzhe Wu and Xilin Chen},
Title = {Real-Time Rotation-Invariant Face Detection with Progressive Calibration Networks},
Booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
Year = {2018}
}