CS 180 Project 3: Face Morphing

Jaxon Zeng



Overview

In this project I produce a "morph" animation of my face into my friend Ben's face. Then I compute the mean face of Brazilian people through morphing into the mean point. I also explore the mean face with my face and try to make me smile through morphing.

Part 1: Defining Correspondences

I start by taking photos of me and my friend Ben.

Jaxon's Face
Ben's Face

Then I label both faces with the tool from Correspondence Tool . I use 88 points for each faces.

Jaxon's Face Labeled
Ben's Face Labeled

In the end of this part, I triangulate two faces using scipy.spatial.Delaunay. For the first three parts, I use the same triangulation.

Jaxon's Face Triangulation
Ben's Face Triangulation


Part 2: Compute the "Mid-way" Face

In this part, I will compute the "Mid-way" face between Ben and me through morphing.
1. Compute the middle position of our faces through average the labeling points of our faces.
2. Calculate the affine transformation matrix from the original triagle to the average triangle. Then perform inverse warping by multiple the target image pixels with the inverse of affine transformation matrix. I loop over all the triangles to compute the "Mid-way" image.
3. Cross-dissolve the warped image of Ben and my face to define the color the "Mid-way" Face.

Mid-way position on Jaxon's Face
Mid-way position on Ben's Face

Jaxon's Face
"Mid-way" Face
Ben's Face


Part 3: The Morph Sequence

By applying different fraction in morphing and cross-dissolve between [0, 1], I create a smooth transition from my face to Ben's face.

Jaxon's Face to Ben's Face
(refresh the website if the face is not changing)


Part 4: The "Mean Face" of a Population

For this part, I compute the average face of a population from multiple images collected from the population. The set of images I use is the faces of Brazilians collected at the Artificial Intelligence Laboratory of FEI . This dataset contains faces collected from 200 people. Two photos are taken for each person with one normal face and one smiling face.

Example Brazilian Male Face
from the FEI Face Database
Example Brazilian Famale Face
from the FEI Face Database
Example Brazilian Famale Smiling Face
from the FEI Face Database
Example Brazilian Male Face Triangulation
from the FEI Face Database
Example Brazilian Famale Face Triangulation
from the FEI Face Database
Example Brazilian Famale Smiling Face Triangulation
from the FEI Face Database

I compute the mean face of Brazilians using the similar process in part 2. I compute the average of all the labeling points of Brazilian faces and warp all the images toward the average position. Then I calculate the mean of all the faces' color to create the mean face.

Mean Brazilian Normal Face
Mean Brazilian Smiling Face

I also warp some of the example faces into the mean position.

Example Brazilian Male Face
Example Brazilian Famale Face
Example Brazilian Famale Smiling Face
Example Brazilian Male Face
warp into mean position
Example Brazilian Famale Face
warp into mean position
Example Brazilian Famale Smiling Face
warp into mean position

I also try to warp my face into the mean Brazilian face position and warp the mean Brazilian to my face position.

Jaxon's Face into
mean Brazilian Face Position
mean Brazilian face into
Jaxon's Face Position


Part 5: Caricatures: Extrapolating from the Mean

I created caricatures of my face by exploring the position of my face away from the mean Brazilian face. I set the warping fraction out of the range of [0, 1] to create the funny result.

Warping faction = -1
Warping fraction = 2

Bells and Whistles: Let Him Smile

I try to make my face smile by transforming my normal face into the position of mean smiling Brazilian faces. The method of morphing is the same as before.
Jaxon's Normal Face
warped Jaxon's Smiling Face
Mean Brazilian Smiling Face