Implementing the joint cascade face detector on AFW dataset. And this implementation is based on landmark_py. All the things have benn tested on Ubuntu 14.04.
All of the following modules can be easily installed by pip
Install script on Ubuntu 14.04
sudo aptitude install python-pip gfortran imagemagick
sudo pip install pillow numpy scipy sklearn
sudo aptitude install python-opencv
I have trained a model based on AFW(only contain 337 faces) with 5 non-face images for demo
. You should train the model on a big dataset
- Download the AFW dataset here
- Replace the location of afw by yourself in
afw.txt
andneg.txt
in config folder(Mine is/home/samuel/data
) - Change
afw_config.py:dataPara:posList, negList
by yourself
- Train on AFW
python -W ignore ./demo_train.py ../config/afw_config.py
- Detection with the Pretrained AFW Model
python -W ignore ./demo_detect.py ../config/afw_model/train.model ../config/pos.jpg
- Use the non-maximum suppression to find the best face rects instead to merge the rects via cv2.grouprects
- Face Alignment at 3000 FPS via Regressing Local Binary Features
- Joint Cascade Face Detection and Alignment
If you have any questions, please email shenfei1208@gmail.com
or creating an issue on GitHub.