This is a reference implementation of the face alignment method described in "Deep Alignment Network: A convolutional neural network for robust face alignment" which has been accepted to the First Faces in-the-wild Workshop-Challenge at CVPR 2017. You can read the entire paper on Arxiv here. You can download the presentation and poster from Dropbox here or Google drive here.
First of all you need to make sure you have installed Python 2.7. For that purpose we recommend Anaconda, it has all the necessary libraries except:
OpenCV can be downloaded from Christoph Gohlke's website. Theano and Lasagne can be installed with the following commands:
pip install Theano==0.9.0 pip install https://github.com/Lasagne/Lasagne/archive/master.zip
The easiest way to see our method in action is to run the CameraDemo.py script which performs face tracking on a local webcam.
Before continuing download the model files as described above.
Download the 300W, LFPW, HELEN, AFW and IBUG datasets from https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/ and extract them to /data/images/ into separate directories: 300W, lfpw, helen, afw and ibug. Run the TestSetPreparation.py script, it may take a while.
Use the DANtesting.py script to perform the experiments. It will calculate the average error for all of the test subsets as well as the [email protected] score and failure rate for the 300W public and private test sets.
The parameters you can set in the script are as follows:
Download the Menpo test set from https://ibug.doc.ic.ac.uk/resources/ and extract it. Open the MenpoEval.py script and make sure that MenpoDir is set to the directory with images that you just extracted. Run the scripts to process the dataset. The results will be saved as images and pts files in the directories indicated in the imgOutputDir and ptsOutputDir variables.
Two TensorFlow implementations of Deep Alignment Network have been published by other GitHub users:
If you use this software in your research, then please cite the following paper:
Kowalski, M.; Naruniec, J.; Trzcinski, T.: "Deep Alignment Network: A convolutional neural network for robust face alignment", CVPRW 2017
While the code is licensed under the MIT license, which allows for commercial use, keep in mind that the models linked above were trained on the 300-W dataset, which allows for research use only. For details please see: https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/
If you have any questions or suggestions feel free to contact me at [email protected].