/WhoAreYou

WhoAreYou is used for face swapping in images.

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

WhoAreYou

WhoAreYou is used for face swapping in images. based on this tutorial.

Examples

source image| destination image| result image


source image| destination image| result image

Implementation

Face Swapper uses artificial intelligence to detect faces on photos and replaces them with other faces of your choice. we say the main idea of the code below:

  1. We take two images: we consider two image, source and destination. source is the one we're taking the face (lip, eye, and ...). destination image is the one the base of face.
source destination
source image destination image
  1. Find landmark points of both images and find convexHull
  2. Triangulation source image
  3. Affine warp triangles
  4. Put all the warped triangles together
  5. Replace source face on destination image and use seamless cloning

Run

To run code, you need to install requirements:

 pip install -r requirements.txt

Then, you can run the cells. you had to change the address of source, and destination image in code, for new examples.

To Do

We need to apply the webcam version to this code.