Home

Awesome

Description

This work is used for reproduce MTCNN,a Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks.

Prerequisites

  1. You need CUDA-compatible GPUs to train the model.
  2. You should first download WIDER Face and Celeba.WIDER Face for face detection and Celeba for landmark detection(This is required by original paper.But I found some labels were wrong in Celeba. So I use this dataset for landmark detection).

Dependencies

Prepare For Training Data

  1. Download Wider Face Training part only from Official Website , unzip to replace WIDER_train and put it into prepare_data folder.
  2. Download landmark training data from here,unzip and put them into prepare_data folder.
  3. Run prepare_data/gen_12net_data.py to generate training data(Face Detection Part) for PNet.
  4. Run gen_landmark_aug_12.py to generate training data(Face Landmark Detection Part) for PNet.
  5. Run gen_imglist_pnet.py to merge two parts of training data.
  6. Run gen_PNet_tfrecords.py to generate tfrecord for PNet.
  7. After training PNet, run gen_hard_example to generate training data(Face Detection Part) for RNet.
  8. Run gen_landmark_aug_24.py to generate training data(Face Landmark Detection Part) for RNet.
  9. Run gen_imglist_rnet.py to merge two parts of training data.
  10. Run gen_RNet_tfrecords.py to generate tfrecords for RNet.(you should run this script four times to generate tfrecords of neg,pos,part and landmark respectively)
  11. After training RNet, run gen_hard_example to generate training data(Face Detection Part) for ONet.
  12. Run gen_landmark_aug_48.py to generate training data(Face Landmark Detection Part) for ONet.
  13. Run gen_imglist_onet.py to merge two parts of training data.
  14. Run gen_ONet_tfrecords.py to generate tfrecords for ONet.(you should run this script four times to generate tfrecords of neg,pos,part and landmark respectively)

Some Details

Result

result1.png

result2.png

result3.png

reult4.png

result5.png

result6.png

result7.png

result8.png

result9.png

Result on FDDB result10.png

License

MIT LICENSE

References

  1. Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, Yu Qiao , " Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks," IEEE Signal Processing Letter
  2. MTCNN-MXNET
  3. MTCNN-CAFFE
  4. deep-landmark