This project aims to predict different facial expressions given a neutral model, to populate a Neural Network dataset.
For this purpose we made some statistics analysis of a set of facial expressions. After these studies, we achieved to build an efficient facial expression predictor that can translate a neutral model to an expressive face.
The expressions studied are:
- angry;
- contempt;
- disgust;
- fear;
- happy;
- sadness;
- surprise.
The project is developed by Alessandro Sestini and Francesco Lombardi
In order to strengthen the results, different techniques have been used:
- Mean, median, mode
- Linear regression
- Support Vector Regression (SVR)
- Neural Network
After a study of data distributions through Mean Shift algorithm, we can conclude that the best method to create a good quality facial expression is the statistics method.
A result example is shown in the figure below; the script let the user to emphasize the expression changing an alpha value.:
To run the project follow these instructions:
-
download the repository;
-
open main.py and change the values in order to obtain the expressions you prefer. You can follow the instructions on the comments;
-
the script will output both the neutral and expressive faces.
Software | Version | Required |
---|---|---|
Python | >= 3.5 | Yes |
MATLAB | >= R2017b | Yes |
MATLAB engine | * | Yes |
Numpy (Python Package) | Tested on v1.13.3 | Yes |
Scikit-learn (Python Package) | Tested on v0.19.1 | Yes |
h5py (Python Package) | Tested on v0.19.1 | Yes |
*the installation procedure for Matlab engine for Python is available here
A copy of the report (italian) can be found here.
Licensed under the term of MIT License.