Project 3: Face Morphing

Nicholas Ha

Defining Correspondences

I selected two images. The first image is of Matt Damon and the second image is of Mark Wahlberg (these are both famous actors).

missing
Matt Damon
missing
Mark Wahlberg

To start, I used the ginput function from matplotlib to select points on each image. Then, I averaged the points from each image and computed a Delaunay Triangulation on these averaged points.

missing
Triangulation on Average Points over Matt Damon
missing
Triangulation on Average Points over Mark Wahlberg

Computing the "Mid-way Face"

To achieve mid-way faces, I warped each image to the averaged points mentioned in the previous section.

This was done by for looping through the Delaunay Triangulation, computing an affine transformation and performing an inverse warp for each triangle, then interpolating from the values in each respective original image.

With these each image morphed to the average shape now, I average the colors on each together to create the mid-way face.

missing
Matt Damon morphed to the average shape
missing
Mark Wahlberg morphed to the average shape
missing
"Mid-way face" of Matt Damon and Mark Wahlberg

The Morph Sequence

To create a morph sequence, I morphed the mid-way images along with their colors but this time across 45 frames.

For each frame, I have a warp fraction and a dissolve fraction.

The warp fraction determines the weighted average of the points between the two images, while the dissolve fraction determines how much color from each image is blended into our midway face image.

The warp and dissolve fractions start at 1 and gets closer to 0, as I want to show the original first image of Matt Damon first and slowly let it morph to the image of Mark Wahlberg across the 45 frames.

missing
Morph Sequence of Matt Damon to Mark Wahlberg

The "Mean Face" of a Population

I picked the Danes dataset of annotated faces and chose a subset of only male faces. I morphed all of the male faces from the Danes dataset and averaged them to get the average male Dane face.

Some examples of faces morphed to the average shape:

missing
Example Image 1
missing
Example Image 1 morphed to average male dane
missing
Example Image 2
missing
Example Image 2 morphed to average male dane
missing
Example Image 3
missing
Example Image 3 morphed to average male dane

Here is the average male Dane face.

missing
Average Male Dane

I warped Matt Damon into the average male Dane's geometry.

missing
Matt Damon morphed to the average male Dane

I also warped the average male Dane into Matt Damon's geometry.

missing
Average male Dane morphed to the average male Dane

Caricatures: Extrapolating From the Mean

I used points from the average male Dane and extrapolated with alpha values less than 0. I subtracted the points from the Matt Damon image from the average male Dane image, multiplied it by alpha, and added it to the original points of the Matt Damon image. These were some of my results:

missing
alpha = -0.5
missing
alpha = -1.5
missing
alpha = -2

Bells and Whistles: Change Age/Gender/Ethnicity/Smile/etc

I decided to change the ethnicity of Matt Damon's face through morphing it's shape and appearance with an average Asian male face.

missing
Matt Damon
missing
Average Asian Male
missing
Matt Damon morphed to the Average Asian Male shape
missing
Matt Damon and Average Asian male appearances blended together
missing
Matt Damon morphed to both the shape and color of average Asian male