Python script to put facial features from one face onto another
Clone or download
Pull request Compare This branch is 5 commits ahead, 3 commits behind matthewearl:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is the code behind the Switching Eds blog post.

See the link for an explanation of the code.

To run the script you'll need to install dlib ( including its Python bindings, and OpenCV. You'll also need to obtain the trained model from sourceforge.

Unzip with bunzip2 and change PREDICTOR_PATH to refer to this file. The script is run like so:

./ <head image> <face image>

If successful, a file output.jpg will be produced with the facial features from <head image> replaced with the facial features from <face image>.