CS 180: Project 3 - Face Morphing

Tobias Worledge, Fall 2024

Introduction

In this project, I implemented face morphing techniques to produce a morph animation of my face into another person's face. Additionally, I computed the mean face of a population and created a caricature of my face by extrapolating from the population mean.

Defining Correspondences

I began by selecting corresponding facial keypoints on both images. I used the provided custom tool to select points such as the corners of the eyes, mouth, nose, and the outline of the face. Below are the original images with the annotated keypoints and the triangulation mesh used for morphing.

Keypoints on Toby and Jonny pictures

Triangulation Mesh

Triangulation Mesh

Computing the Mid-way Face

Next, I computed the average shape by averaging the corresponding keypoints from both images. I then warped both faces into this average shape using affine transformations on each triangle in the mesh. Finally, I averaged the colors of the two warped images to produce the mid-way face.

Original Image A

Toby Image

Mid-way Face

Jonny Image

Original Image B

Mid-way Image

The Morph Sequence

I generated a morph sequence by varying the warp and dissolve fractions from 0 to 1 in equal steps. This created a smooth transition from my face to the target face. Below is an animated GIF showcasing the morphing process.

Morph Sequence

I've always wanted to be like my friend Jonny!



I noticed that the transition was pretty abrupt since our face shapes are different! Here's another example with the picture of George that we were given

Toby to George

Toby to George!

The "Mean Face" of a Population

I used the FEI Face Database dataset, which includes annotated facial keypoints for each image. I computed the average face shape of the population and warped each face into this average shape. Here are some examples:

Warped Face 1

Face 1a Warped to Average Shape

Warped Face 2

Face 2a Warped to Average Shape

Warped Face 3

Face 3a Warped to Average Shape

After warping all faces to the average shape, I computed the mean face of the population by averaging the pixel values. Below is the mean face:

Mean Face of Population

Mean Face of the Population

I also warped my face into the average geometry and warped the average face into my geometry:

My Face to Mean Shape

My Face Warped to Mean Shape

Mean Face to My Shape

Mean Face Warped to My Shape

It turned out to be pretty difficult to map pixels exactly when following the mapping of the given dataset!

Caricatures: Extrapolating from the Mean

To create a caricature of my face, I extrapolated from the population mean by amplifying the difference between my face shape and the average face shape. This accentuates the features that are unique to my face.

Caricature with Alpha 1.3

Caricature with Alpha 1.3

Caricature with Alpha 1.5

Caricature with Alpha 1.5

Caricature with Alpha 1.95

Caricature with Alpha 1.95