Expression Swap is like a Face Swap but with facial expressions. The first goal of the project was to modify an image of a face to make it smile. Then we decided to go further by swapping expressions between two faces.
We made multiple branches to have a proper seperation of the different results.
- cam-to-image
Transfer facial expressions from a face filmed by the camera to the face on a selected image.
- simple-swap
Transfer facial expressions from a face to another face both taken by the camera.
- double-swap
Swap facial expressions between two faces both taken by the camera.
You must have cmake, dlib and opencv installed on your machine.
pip install cmake
pip install dlib
pip install opencv-python
This is the line to launch the expression swap program.
python expression_swap.py predictor.dat
Once the program is launched, there's an initialization phase. You need to press Space to take a picture of two faces, one on the left-side and one on the right-side. You have to make a poker-face ! This initialization process permits to detect the expressions made when swapping. You can confirm your poker-face picture by pressing 'y'. If you want to take it again, you can press 'n'.
This 3 months project was entirely made by Ulysse Regnier and Maximilien Chaux. It was a project for our 3rd year of university in Claude Bernard Lyon 1. This page was the subject.
