CS 180 Project 3: Face Morphing

Kevin Sheng


Project Overview

The goal of this project is to produce a "morph" animation of my face into someone else's face, compute the mean of a population of faces and extrapolate from a population mean to create a caricature of myself.




Part 1: Defining Correspondences

Below are the images I picked, and the correspondences I picked. I focused on mapping critical features such as eyes and nose to each other, so the transition can be as smooth as possible. After picking the correspondences, I then found the Delaunay Triangulation of the points. It's important to use the same triangulation on both sets of points, as it can otherwise lead to warping issues.

henk
Picture of my friend Henk
kevin
Picture of myself
henk
Correspondences and triangulation
kevin
Correspondences and triangulation



Part 2: Computing the "Mid-way Face"

To compute the midway face, we need to consider both the warping and the coloration of the end product. To make sure that the features of both images match up, we first calculate the midway correspondence points by averaging the two sets of correspondences, then calculate the affine matrices that transform the original coordinates to the midway coordinates. We then invert those matrices to get the original region for any given region in the midway image. After that, we sample the pixel values of the original regions, then average them to find the resulting value for our midway region.

henk
Picture of my friend Henk
kevin
Picture of myself
henk
The midway face of me and Henk



Part 3: The Morph Sequence

Using the techniques described in part 2, we can tweak parameters in order to create a progression of face morphs. Instead of averaging the warp and the color, we can set specific weights to both images to emphasize or de-emphasize their features. Connecting many of these morphs creates a sequence of visually smooth face morphs.

henk
The morph sequence from Henk to me



Part 4: The "Mean face" of a population

For this part, I used the publically available Danes dataset and analyzed the mean face of a wider population. The dataset itself contains 37 images, and the correspondence points are already marked and stored in files. The process of finding a mean face is functionally the same as those of the midway face, just with more than 2 images, and equal weight for each image. I calculated the mean face of the female participants in the dataset, and fitted individual images to the mean correspondence points.

12f
Original image
12f
Image warped to the mean face geometry
30f
Original image
12f
Image warped to the mean face geometry
henk
The mean face of the female participants in the Danes dataset
12f
My face warped to the mean face geometry
12f
The mean face warped to my face geometry



Part 5. Caricatures: Extrapolating from the mean

For this part, instead of interpolating the geometry and creating midway faces, we extrapolate it to exaggerate specific features in the correspondence points. To do this, I subtracted the mean dane female face geometry from my own face geometry, then added that back to my geometry, scaling with a certain alpha value. Depending on the alpha, certain features of my face gets more exaggerated.

12f
Extrapolating with alpha = 1.1
12f
Extrapolating with alpha = 1.5

Bells and Whistles

For bells and whistles, I decided to morph my face onto the average chinese female. I found the image here, and annotated a new set of correspondences to both my own picture and the image. After some cropping, I was able to apply the morph to my face.

12f
The average chinese female, cropped for simpler processing
12f
My cropped picture
12f
The delaunay triangulation of the average chinese female
12f
The delaunay triangulation of my picture
12f
Morphing just the shape of the image to my face
12f
Morphing just the color of the image to my face
both
Morphing both the shape and color to my face