CS194-26 Project 3: Face Morphing

Overview:
This time, we explore face morphing, ways of altering an image of someone's face and turning it into a face.
Italian Trulli
(image not relevant)
There are a number of applications of face morphing, such as snapchat who have found a way to make messing with this program a profitable business venture.
Lets start with averaging a face. Our first image will be of the genetically superior, alternatively constructed Mammoth, Tyler 1 (taken from his social media):
Italian Trulli
For our second image, we'll use a lesser known and not very-acclaimed actor George Clooney:
Italian Trulli

Defining Correspondences
First, we want to define correspondences, or points that we want to map to each other. A point on one image is mapped to a point on another image.
First, we'll align both images to have the same size and shape:
i Ita
Then, we'll manually select points that correspond to each other on the images:
i Ita
Now we're ready to merge the images together!

The Midway Face
Here's what the combined face using the points above looks like:
i Ita Ita
The reason for the stretchines is most likely the fact that the points are more spread around the sides than the center.

The Morph Sequence
Next, we will create multiple midways, by changing the averaging coefficient.
Instead of simply averaging to have a midway face, we'll change the coefficient by 1/46 to have 46 evenly spread frames, creating a morphing gif:
Ita

Mean Face of the Population
Using the Danes dataset, we'll compute the The "Mean face" of a population. The dataset has asf file for each image, stating where each of the faces will be mapped to.
We then average the images using the same processes as above Here's what this looks like:
Ita
Here's what it looks like when we average the "average" dane and a couple of danish people:
For some of them, it seems like the images were a bit hazy due to the changing of facial positions of the pictures in the dataset
Ita Ita
Ita Ita
Ita Ita
Ita Ita
Ita Ita
Finally, here's the illustrious artist behind this page averaged into the average dane:
Ita Ita

Carcature
Here's a carciture of me as well, with my "danishness" turned to negative 0.9:
Ita

Bells and Whistles: Gender Morphing
Taking the average of all the women in the Danish dataset, here is the average female Dane:
Ita
Now here I am as a female dane, having (visually) changed my gender:
Ita
Left: Original me, Center: Color Morphing Only, Right: Shape Morphing only
I used the weighted average of 0.2 to get rid of my pesky facial hair to make me closer to the average female in the Danes set, which seemed to work out.
Ita Ita Ita

Bells and Whistles: PCA
Now, lets take the same transformation, but using the PCA space with 30 dimensions, and see how the averaging and a carcature would look:
Ita
It's a little better but ever so slightly blurry due to the loss in the PCA domain. I could have used more dimensions as well, but I think this illustrates the point.
However, when producing a Carciture, this image was produced (using the same extrapolation of -0.9 from above):
Ita
Now that I haunt your nightmares, thank you for reading! This project was fun and hairloss-inducing, but a worthwhile endeavour to see how morphing iamges can work using triangles.