CS 194-26: Project 3

Face Morphing

Emily Ma

Summary: In this project, I defined correspondences between key features of faces in order to morph the shape and appearance of different faces using affine transformations and averaging. I create a video morphing my face with a classmate's. Additionally, I use an existing dataset of Danish faces to create the average Danish face. I also do additional exploration by creating a caricature of myself as a Danish person and enhance my face to appear more masculine.


Part 1: Defining Correspondences

To define correspondences between my face and Dylan's face, I first labeled both faces at key features that I thought would create a good triangulation, such as the jaw, eyes, etc.. I made sure that the points matched at the feature and order between sets of correspondence points. I then used these keypoints to create a Delaunay triangulation.


Emily keypoints
Dylan keypoints
Emily triangulation
Dylan triangulation

Part 2: Computing the "Mid-way Face"

As an initial step to creating a video morphing my face and Dylan's face, I first created the midway morph of our faces. I calculated the average of the keypoints from Part 1 and found the Delaunay triangulation. I then found the affine transformations for the inverse warp that maps the average points to the original images for each triangle. Then, I used a polygon mask and interpolated the original image color values to get the colors for the pixels at the new coordinates in the midway face. The final midway face was the average of the two morphed faces to the average shape and their corresponding color pixels.


Original Emily
Original Dylan

Midway Triangulation
Midway Face

Part 3: The Morph Sequence

Continuing off of Part 2, I used the same method for computing the midway face to also compute the morph at various interpolation steps from a warp fraction and dissolve fraction from 0 to 1. The warp fraction controls how warped the images are where 0.5 is the midway face and the dissolve fraction determines the weighting between the color of the images. After making 45 frames of the morph with interpolated warp fraction and dissolve fraction, I assembled the images into a GIF morphing my face into Dylan's face.

Part 4: The "Mean face" of a Population

Using the IMM Face Database of Danish people, I created the average face. I first computed the average keypoints of the 40 faces and then morphed each Danish person into this average shape. To find the average Dane face, I simply averaged all of the Danish faces in the average shape. Additionally, I tried warping my face into the average Danish face geometry and warped the average Danish face into my face geometry. There were some weird distortions when doing this likely due to how the keypoints from the dataset do not surround the head, so the head shape gets weirdly distorted.

Danish Number 10
Danish Number 10 Morphed to Average

Danish Number 20
Danish Number 20 Morphed to Average

Danish Number 30
Danish Number 30 Morphed to Average

Average Danish Face
Average Dane Morphed to my Geometry
Me Morphed to Average Dane Geometry


Part 5: Caricatures Extrapolating from the Mean

I further created a caricature of my face by extrapolating from the average Danish face found in the previous part. I calculated the difference between the average Danish keypoints and my face geometry. The final caricature would just be my facial keypoints summed with alpha times the difference between the faces, where alpha is a value less than 0 or greater than 1. I show the results of various alpha values below. Alpha values less than 0 would be me as an anti-Dane and alpha values above 1 would be me as a hyper-Dane. Similar to the previous part, there are some distortions due to weirdly defined keypoints not aliging to my image.

Original Image
alpha = 1.25

alpha = -0.75
alpha = -1.5

Part 6: One Bells & Whistles

For my choice of bells and whistles to attempt, I chose to change my features to appear more masculine. I achieved this by morphing my image with an image of the average Asian man that I found online. I used the same techniques I have used earlier to morph to the midway face. I also show the shape morph and color morph separately. Overall, the result worked well and my face now has more masculine features such as a more rectangular jaw and wider face and appears mostly believable.

Original Emily Image
Orignal Average Asian Man Image
Emily as a Man

Morphed Shape
Morphed Color
Morphed Shape and Color