Face Morphing

CS194-26: Image Manipulation and Computational Photography

Author: Sunny Shen

Overview

This project uses face images and morph faces together with triangulations and affine transformation.

Changing Faces

In this part, I'll do two examples of morphing one face to another:

Fiona_and_Collin

Rons

Defining Correspondences

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.

fiona_collins_triangles

ron_triangles

Computing the "Mid-way Face"

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.

midway_faces

The Morph Sequence

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.

The "Mean face" of a population

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:

warp_to_avg_face

Finally, we get our average face:

average_face

My face warped into the average shape:

my_face_into_avg_shape

Average face warped into my face shape:

avg_face_into_my_face

Caricatures: Extrapolating from the mean

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.

caricatures_me

Bells and Whistles

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)

average_smile

me_smile

Changing Ethnicities

I found average women faces for Chinese, Japanese, and Korean and warp my faces into those average Asian female faces.

Average_asian_faces

me_to_asian_faces