CS 194-26: Project 4

Face Morphing

Ellen Hong

Overview

This project allows us to explore how to use matrix transformations to morph one face into another based on a specified set of feature points. From this project, we create video morph sequences of different faces and generate mean faces of different population sets based on the same morphing technique.

Morphing

The morphing algorithm can be summed up by the following steps:

1. Define the correspondences of two images. Specifically, we want to define a set of features points that map from one image to another. We will create our moprhing sequence based on these points.

2. Compute the mid-way face. In order to do this, we take the average of all the feature points to create an average shape, then warp both faces into that shape. We get a warped image by averaging the colors at each point.

3. Create a morph sequence. This can be done in a similar manner to computing the mid-way face, except that we now interpolate our values according to a sequence of fraction values between [0, 1]. We create a sequence of 45 frames, and for each frame we warp each of the two images into an intermediate shape configured by the warp fraction value. We then take cross-dissolve two warped images using the cross-dissolve fraction value, to create the final frame of that morph. We append these frames to generate a video sequence.

Results of a face morph between me and Kimiko Glenn:

Me
Kimiko Glenn
Midway, Me x Kimiko Glenn
Me, warped into mid-way shape
Kimiko Glenn, warped into mid-way shape
Face morph sequence, me to Kimiko Glenn

Results of a face morph between Kanye West and Jay-Z:

Kanye
Jay-Z
Midway, Kanye x Jay-Z
Kanye, warped into mid-way shape
Jay-Z, warped into mid-way shape
Face morph sequence, Kanye to Jay-Z

Computing the Mean Face

Below we have the results of computing the mean face of the entire population in the Danes dataset, just the female faces, and just the male faces. We use only the front-facing version of each image.

mean face, Danes dataset
mean female face, Danes dataset
mean male face, Danes dataset

Some examples of male & female images warped to the mean face of the entire population:

face (01) warped to average face
face (06) warped to average face
face (24) warped to average face
face (08) warped to average face
face (15) warped to average face
face (35) warped to average face

Examples of some male faces warped into the mean female face:

face (12) warped to average female face
face (14) warped to average female face
face (30) warped to average female face

Examples of some male faces warped into the mean male face:

face (05) warped to average male face
face (18) warped to average male face
face (21) warped to average male face

We can also look at how my face looks warped into the different mean faces:

my face warped to average face
my face warped to average female face
my face warped to average male face

And when we warped the mean faces into my own face:

average face warped into my face
average female face warped into my face
average male face warped into my face

Caricatures

Caricatures are produced by enhancing the feature differences in a warp. In our case, we can produce a caricature by taking the difference between a face and the mean, and then adding back that difference to the original face, scaled up by some positive factor. We can show the results of creating a caricature of my own face warped into the mean faces:

caricature, my face to mean face
caricature, my face to mean female face
caricature, my face to mean male face

Bells and Whistles

We use our warping algorithm to produce different effects on my face. For example, we take the midway image of a morph sequence between my face and the average Indian female face, to appear as if I've changed ethnicity:

my face
average Indian female face
me as Indian

We produce similar results via a morph sequence between my face and the average German female face:

my face
average German female face
me as German

We can also attempt to turn me into a male via a morph sequence between my face and the average Chinese male face:

my face
average Chinese male face
me as male