Author: Sunny Shen
This project uses face images and morph faces together with triangulations and affine transformation.
In this part, I'll do two examples of morphing one face to another:
First, we want to find important facial features by selecting "key points" and constructing Delaunay triangulation. I chose 38 points as facial features and the 4 corners of the images so that the morph will change the relative position of face/head in the images.
Next, I compute the mid-way face by first computing the average shape of the 2 images and warp both faces into that average shape with affine transformation, and then average the color together. Note that since I didn't align the images before the warp, the midway face doesn't look exactly just like 1 single face (I rely on the 4 points at the corner to do the morph) as the color averaging doesn't make two images perfectly blend.
Morphing faces include 1) warping the shapes of faces into an intermediate face depending on the warp_frac
, and then dissolving the color together based on dissolve_frac
. I created a series of 46 images that have 2 images being the original faces and 44 intermediate faces. Then I put those images together as gifs so that we can see the animated transition.
What does an average person from a set of population look like? I used the dataset from Danes that has images of 40 people with different angles of their faces/different expressions. Luckily, the dataset provides the annotation of facial features (58 each) so we don't need to do that again for every single image.
To calculate the average face, we first calculate the average shapes of the face by averaging the triangulations, and then morph every single face into the 'average shape', and last but not least we average the images to get the "average face"
Here are some examples of morphing faces into the average shape:
Finally, we get our average face:
My face warped into the average shape:
Average face warped into my face shape:
The face morphing done in the previous section is intrapolation (with 0<= warp_frac
<=1). warp_frac
= 1 would show the original image. For extrapolation, we can have warp_frac
< 0 or warp_frac
> 1. I created some caricatures of my face by extrapolating from the population mean.
Smile
Also using the dataset from Danes, I calculated the average smile face and then warp my face into the average smile face (alpha = 0.8)
Changing Ethnicities
I found average women faces for Chinese, Japanese, and Korean and warp my faces into those average Asian female faces.