WhoAreYou is used for face swapping in images. based on this tutorial.
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:
- 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 |
---|---|
- Find landmark points of both images and find convexHull
- Triangulation source image
- Affine warp triangles
- Put all the warped triangles together
- Replace source face on destination image and use seamless cloning
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.
We need to apply the webcam version to this code.