Face Recognition in real-world images [ICASSP 2017]
This is the source code of my article.
Fontaine, X., Achanta, R., & Süsstrunk, S. (2017). Face Recognition in Real-world Images. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) (No. EPFL-CONF-224338).
It is inspired from the RSC algorithm [1].
pip install numpy scipy Pillow l1ls sklearn matplotlib
cmake
command:cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_OPENGL=ON -D WITH_VTK=ON -D WITH_GTK=ON -D WITH_CUDA=OFF ..
sudo apt-get install libopenblas-dev
./bootstrap.sh --with-libraries=python
./b2
sudo ./b2 install
git clone https://github.com/davisking/dlib.git
git checkout tags/v19.0 # current version did not work for me
sudo python setup.py install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
haarcascade_frontalface_default.xml
and to the shape_predictor_68_face_landmarks.dat
file in the config.py
file.I used the LFWa version of the LFW dataset in order to be able to compare my results with other algorithms. It can be downloaded with
wget http://www.openu.ac.il/home/hassner/data/lfwa/lfwa.tar.gz
tar xvfz lfwa.tar.gz
cp -R lfw2 <directory-to-store-dataset>/.
Change the path to the lfw2
folder in the config.py
file.
Run python recognizer.py
to run the code of the paper. You can change the parameters (number of training images, etc) in the file config.py
. It should be the only file you have to modify.
[1] Yang, M., Zhang, L., Yang, J., & Zhang, D. (2011, June). Robust sparse coding for face recognition. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on (pp. 625-632). IEEE.