CS 194-26 Project 3: Face Morphing

Henk Tillman

The Midway Face

The main technique that I used in this project was computing facial morphings by cross dissolving triangular subsections of faces. I began with two corresponding point sets of the faces that I wanted to morph between. The point sets for each face were in order, that is, if the n-th point of one image corresponded to a particular part of the face, like the corner of the eye, then the n-th point of all of the other images corresponded to the same part of those images.

Once we have a point set, we can use Delaunay Triangularization to find triangles which cover the entire image and are disjoint, with verticles at the corresponding point mappings. Thus, we should have triangles in each image which roughly correspond to the same parts of the face (the left eye, the mouth, etc).

If we have a target triangularization (found by taking a weighted average of the the point sets and then computing the triangularization), then we can perform affine transformations on each of the triangles in an image to warp them to the corresponding triangles in the target triangularization. By doing this with both images, and also computing a weighted average of the transformed triangles before adding them together, we can create a fairly convincing morph between the two images.

To create a gif of the entire morph, we simply slowly increase the alpha of the point set average and the color average from 0 and 1 (where the weight of image 1 is alpha and the weight of image 2 is (1-alpha)), thus creating a smooth transition from one image to another.

Me and my Roommate

Me!
My Roommate (Christian Lee)

Midway Face

The Morph Sequence

The "Mean Face" of a Population

I chose to use the annotated faces of Danish computer scientists. For the average face, I used the subset of the males.

Computing the mean face required several steps. I started with about 30 images and their corresponding point mappings. By averaging together the point sets, we could find the average location of each part of the face. Finding the triangularization of this point set yielded the average geometry of the population. Once we had this average geometry, we could use the same triangle affine transformation technique as before. I warped each of the faces into the average geometry, summed them together, and then divided by the total number. Thus each triangle of the average face is the average of all of the corresponding triangles in the population images, just transformed so that every triangle has the same point coordinates.

The Mean Face

Some example faces in the dataset morphed into the average face geometry

These are some examples of components of the average face which I summed together and divided by the total number to compute the average face.

My face in the average geometry

Here, I labeled my face with the same point labeling technique as the Danish dataset. Then I warped my face's geometry into the geometry of the average face

The average face with my geometry

This technique is the same as the previous one, except for I started with the average male face and used my own geometry as the target.

Caricatures: Extrapolating from the Mean

With the previous face morphing, I computed a cross dissolve with the geometries as well as the colors between the two images. In this section, I morphed my face into a cross dissolve between my facial geometry and the average male facial geometry. This cross dissolve looks like alpha*my_facial_geometry + (1-alpha)*avg_facial_geometry. Usually, alpha is between 0 and 1. In order to caricaturize my facial geometry, I made alpha be a negative number so that the target facial geometry emphasizes the facial geometry which differs between mine and the average.

alpha = -0.8

Bells and Whistles: Emphasizing Masculinity

I wanted to exaggerate the "male features" of my face using the information gained from the Danish dataset. First, I split the Danish dataset into men and women. Then, using the same technique as the last section, I computed the average geometries for each set. By subtracting the average female geometry from the average male geometry, I hoped to isolate the direction in the facial geometry vector space which encapsulated the differences in gender. I added this vector (multiplied by a constant which I tuned) to my own facial geometry. Finally, I morphed my own face into my own modified facial geometry.

It definitely looks a bit strange, almost like cubism-style portrait (seeing the same face from multiple angles simultaneously). But I also see the emphasized "masculine" features like the jaw which is more square and the angular cheeklines.

Bells and Whistles: Adding a Smile

The portrait that I used isn't smiling. Let's put a smile... on that faceeeee-uh! I manually created a facial point mapping which emphasized a smiling mouth, and then morphed my face into it.

This one looks more natural than the last bells and whistles image, but still pretty strange. I think it's because the eyes haven't changed at all, so it's a fake smile.