Face Morphing

CS 194-26 Project 4
Alice Tarng



Overview

Face morphing is the technique by which one person's face is gradually transformed into another person's face. This morph consists of 2 simultaneous steps: warping between the image shapes, and warping between the image colors.

The warping of the shape is the more complicated step. First, corresponding points between the 2 photos must be set; the more correspondences, the smoother the transformation. These correspondences are then used to compute a triangular mesh on each image. As we gradually morph from image A to image B, we morph the shape of these triangles accordingly (via affine transformations). Morphing the mesh warps the shape of the entire image, thus giving us the shape we desire. The color is then morphed via a simple weighted sum between the pixel values of the 2 images.

We then save the warped image at every time step, create a gif, and tada! We have a cool, sometimes disconcerting, gif of person 1's face morphing into person 2's face.



Images

Here, I morphed Emma Watson into Daniel Radcliffe. Click to enlarge:

Emma (Image A)
Dan (Image B)

And here is the "mid-way" face - half Emma, half Dan.

Midway


Morphing Sequence

Here is the full morphing sequence from Emma to Dan, with 45 steps.

Morph


Average Face of a Population

Using the dataset of faces found here (the FEI Face Database), I computed the "average face" of the population of smiling females.

Here, a couple of individuals morphed into having the average face shape.

Here, the average face of the smiling females.

Here is my face warped into the average shape, and the average face warped into my shape.

You can see that the warping looks quite like warping "up" and warping "down" - my face is at a different angle than the faces in the dataset, and the shape morph tries very hard to make up that difference. However, you can see near the end that the warps get a bit, let's say extreme , and a bit unrealistic. This is a good reminder of the fact that shape warping can't be extended too far - we compute these morphs under the assumption that pixels within one triangle directly map, via an affine transformation, to the pixels within its corresponding triangle in the other image. When the triangles are warped too far, this assumption starts to get a little dicey.

Caricatures

Caricatures are created by extending the difference between an individual's face, and the average face. Here's a caricature of me.

Definitely emphasizing that angle difference in my picture, eh?



Bells and Whistles - Changing Gender

Here's me as a male - morphing just my appearance (color of the image), just my shape, and both (a full morph). The male image was taken from this image - specifically, the average Chinese male (sadly, I couldn't find a general average American male).

The appearance morph is a bit odd - a simple cross-dissolve requires that the images be aligned for the best result. My photo is not perfectly aligned with the photo of the average male, so the results are a bit funny.

The shape morph also gets a bit funny near the end. Here, I think the distance of the photo differs between me and the male, so when it gets time to really "pull back" my face to shrink it, the warp might be overextending itself.

Morphing just appearance
Morphing just shape
Full morph (appearance and shape)