CS194-26 Project 4: Face Morphing

By: Shaan Appel (-abu)


Face Morphing

In this project we morphed one face into another using the following process to get a halfway face.

  1. Defining Correspondences: We manually selected pairs of corresponding points between two images using the scheme here numbered here
  2. Halfway Shape: We find the shape halfway between the two faces by averaging the correspondance pairs and perform a Delaunay Triangulation on the average.
  3. Inverse Warp: Here we tranform both the start and the end faces to the halfway face shape. For each triangle in the triangulation we get an affine tranformation that maps the source image triangle to the halfway shape triangle. For each pixel in the halfway shape image we find the tranformed pixel i the source image and interpolate the nearby source pixels to get the correct color.
  4. Finally we cross-disolve the two halfway shape images to get our midway face.

To create a full morph we create an interpolated face. We use a shape that is an interpolation between the shapes instead of directly halfway. We also interpolate the colors by the same factor to get a color that is not directly halfway.

Original Adam

The "Mid-way Face"

Original Shaan

Full Morph

Danish Faces

Here we find the average Danish face using a dataset found here. Here we average the face shapes of the 40 neutral faces, and morph each face into this average shape. We then average the pixel values for all the morphed faces to get the average face.

The "Mean Face"

Face 01-1m Warped to Mean Shape

Face 05-1m Warped to Mean Shape

Face 06-1m Warped to Mean Shape

Face 07-1m Warped to Mean Shape

Face 08-1f Warped to Mean Shape

Face 09-1m Warped to Mean Shape

Shaan to Dane, Dane to Shaan

Here we warp Shaan to the average Danish face shape. We also warp the average Danish face to Shaan's face shape.

The "Mean Face"

Shaan's Face

Shaan's Face Warped to "Mean Face" Shape

"Mean Face" Warped to Shaan's Face Shape

Caricatures

We can also create a caricature of Shaan! Here we see Shaan's face has a larger nose and is much longer. A caricature will accentuate these featuers. First we get the difference between Shaan and the mean Danish face. We then get a caricature by adding some fraction of the shape difference to Shaan's face shape, and warping to this new shape.

Extrapolated Caricature: + 0.2 diff

Extrapolated Caricature: + 0.4 diff

Extrapolated Caricature: + 0.6 diff

Extrapolated Caricature: + 0.8 diff

Extrapolated Caricature: + 1.0 diff

Bells and Whistles

Making Shaan Smile using Danes

Earlier we computed the mean Danish neutral face. We can also computer the mean Danish smiling face. Taking the difference between the shapes and colors we get a shape and color vector that represents smiling. By applying these vectors to the Shaan face, we make Shaan smile!

Neutral Face Dane Mean

Smiling Face Dane Mean

Original Shaan Image

Applying only Smile Color Transform

Applying only Smile Shape Transform

Applying both Color and Shape


Morphing Faces in Game of Thrones (Music Video)

I used 15 faces from Game of Thrones posters depicting the Hall of Faces. See the video below for a morph of all of them! (Note: Because I use the theme music there may be ads)