CS194-26 Project 3: Face Morphing

Computing The "Mid-Way Face"

I decided to compute the mid-way face of Barack Obama and Hillary Clinton. To do this, I labeled each headshot with point correspondences (I used 46 feature points for each, covering key features such as the eyes, nose, mouth, corners, and facial edges). Then, I computed a Delaunay triangulation of these points in order to segment each face into a bunch of triangles. Using these point correspondences, I computed the average keypoint positions at the midway point. I then iterated through the triangle regions and computed the affine transformation between the triangle region in the original image and the region at the halfway point. This was computed using linear regression since the transformation has six DOF and the three vertices give us three 2D displacements, which means we have six equations and six unknowns. Below are the original images as well as the morphs of each image into the halfway shape.

By averaging the halfway images, we can get our final halfway image.

As you can see, we actually get pretty decent results in these images. From the first-step halfway images, we can see that simply adjusting the point features without averaging images allows us to match facial expressions.

The Morph Sequence

Next, we can use a similar process to morph between images instead of just finding the halfway point. We can control the fraction by which we are morphing between two images/point-sets using a parameter that controls how close the point-set is to the point-sets of the two images we're morphing (we call this parameter warp_frac). We can also control how much of each image we're using while averaging using another parameter (called dissolve_frac). Here are some intermediary morphing images.

Here's a video of the morphing sequence.

The "Mean Face" of a Population

I decided to use some of the portrait images from the Game of Thrones promo posters (no spoilers ahead!). Here are some of the original images I cropped by hand.

Similar to above, I labeled each of the 12 images with key point features. Using this, I was able to compute an average face by morphing each of the images into the average key point shape. Below are some of the images morphed into the average shape.

Then, I simply averaged the images. Here's the mean image.

Next, I tried to morph our previous image of Obama into the mean shape of the Game of Thrones faces. I also tried to morph the mean image of the Game of Thrones faces into the shape of Obama's face. Both of the results are pretty terrifying.

I also tried extrapolating from the mean to produce a caricature of Obama's face shaped like the Game of Thrones faces. This was done by setting warp_frac to a value greater than 1. The result is pretty absurd.

I suspect that the caricature and Obama/GoT morphing images didn't turn out well largely because Obama's eyes are open, whereas the GoT portraits all have closed eyes. Since I chose the feature points based on the GoT character portraits, I suspect that a much more dense labeling of key points could have improved the morphing.

Bells and Whistles -- Music Video!

I tried to make a music video morphing the Game of Thrones faces together with the Game of Thrones theme playing in the background. Unfortunately, I couldn't find a way to get the audio to work without copyright issues. So here's the video with some stock music from YouTube, sorry :(