Facial recognition among profiles Github Github

Detect if a person has sunglasses using a set of profile pictures of different persons. Each one of them has pictures with different head positions, emotions and with/without sunglasses.
C++, Qt, OpenCV

The purpose of this project (originally comes from Tom Michell's book : Machine Learning) is to classify a set of profile pictures of different persons. Each one of them has pictures with different head positions, different emotions and with or without sunglasses. Our purpose was to detect if a person had sunglasses or not. We have implemented a whole artificial neural network Github using the backpropagation to compute the error. We improve our system in order to optimize the success rate. We have also developed several ways of validation using a normal (one training set and one validation set), or using a k-fold cross validation. A GUI has been developed using the Qt framework.

The Project

Profile images

Our dataset comes from images of 40 students in the course given by Tom Mitchell. Each student has 32 pictures of him, with different head positions (e.g. top, right), emotions (e.g. neutral, happy) and with/without sunglasses. As a pre-process step, we have used binary Otsu's segmentation in order to have a binary image rather than a gray image. This allows us to have only 2 possible values per pixel.

Artificial neural networks Github

We have implemented our own feed-forward neural networks, using backpropagation to propagate the error, momentum to try to minimize training time and also random weight initialization. We also have implemented all the necessary function to do cross-validation, shuffle and split the data.


In order to learn the different weights as well as the neural networks parameters (number of hidden layers, number of neurons etc.), we have used cross-validation with training, validation and testing set. We use the training set to learn, the validation set to tune our parameters and finally the testing set to approximate the generalized error (which should be unbiased).


Type Course project
Degree B.Sc. HE-Arc HE-Arc, 3rd year
Course Image processing
Duration ~30 hours
Supervisor Prof. François Tièche
Co-developer Alexandre Perez