Using mxnet for face-related algorithm, here now only provide :
mxnet-face-fr50
(faster-rcnn+resnet-50) model, which achieve tpr=90.4% when fp=100 and tpr=95.5% when fp=500 on fddb.cd model
./get-models.sh
we provide the pre-trained model mxnet-face-fr50-0000.params on baiduyun or dropbox, which is trained with resnet-50+faser-rcnn for 7 epoch on wider-face[4] dataset, our mxnet-face-fr50's performance on fddb is:
you can also find the result on fddb official website
the training code is come from my anohter repo : train_widerface.py
the way of using mxnet-face-fr50
for face detection is very easy:
mxnet-face-fr50-0000.params
,mxnet-face-fr50-symbol.json
and put them into detection directory../demo.sh
, you can set different parameters for face detection, see it by python detection.py --help
BTW, the detection speed is slow, only about 3~4 image/second on k80 GPU.
run ./test.sh
in shell.
This script will run the evaluation on lfw using trained model, the model needs 128x128 image size for input, you can using your own aligned lfw data, we also offered the aligin-lfw dataset, passward : mg2i.
before runing, you should change your own align_data_path
in test.sh. the model
run ./run.sh
in shell.
This script will train the lightened cnn face model, using CASIA-WebFace dataset, more accurately, i used the cleaned version.
Again, you should change with your own setting in run.sh, and using your own hyper-parameter when training the model.
model/opencv/cascade.xml
../model/get-models.sh
to download the shape_predictor_68_face_landmarks.dat
for face alignment.cd attribut
then put the image you want to predict with name aaa.jpg and run in shell:
python -u predict.py --img aaa.jpg
the example output will like this:
run ./test.sh
in shell.
this script will run the evaluation on CelebA dataset, the dataset is used for face attribute prediction, and each face image will have 40 binary attributes(labels), so we should using our model to predict the attribute of the test images in CelebA.
run ./run.sh
in shell.
This script will train the lightened moon face model, using CelebA train and val dataset, we use the original image set, not the aligned set. so we should first using opencv and dlib to do face detection, enlarge the face area and then cropped it, we finally training the model using the cropped image.
[1] Wu X, He R, Sun Z. A Lightened CNN for Deep Face Representation[J]. arXiv preprint arXiv:1511.02683, 2015.
[2] Rudd E, Günther M, Boult T. MOON: A Mixed Objective Optimization Network for the Recognition of Facial Attributes[J]. arXiv preprint arXiv:1603.07027, 2016.
[3] Jiang H, Learned-Miller E. Face detection with the faster R-CNN[J]. arXiv preprint arXiv:1606.03473, 2016.
[4] Yang S, Luo P, Loy C C, et al. WIDER FACE: A Face Detection Benchmark[J]. arXiv preprint arXiv:1511.06523, 2015.