Project 3: Face Morphing

Sean Farhat

1. The Morph Sequence

In this project, we were tasked to morph one face into another. While I used to think the process was quite technical, upon learning the method, I was suprised as to how straightforward it is. It is composed of 2 steps:

  1. Morph the shape of one face into the shape of the other
  2. Fade out the old image and fade in the new one
Morphing one face into the other is the challening part. To do so, we first need to decide how to get the "shape" of a face. A simple way of doing this is to choose features in the face that we want to align, such as eyes, lips, ears, etc. One we have these "keypoints", we can utilize a popular method known as Delaunay Triangulation to break up the face into triangles, with corners at these points.

We do this triangulation for both the original and final faces, that way we have a 1-to-1 mapping of each triangle. Now, instead of warping the entire image, we can just transform each triangle individually. This is actually a linear operation, so it can be done via a matrix computation. It turns out we need 3 unique starting points and ending points (that do not lie on the same line) to get this matrix, which is precisely why we chose triangles! We need to morph both faces together, so to get this smooth effect, we compute the average geometry/triangulation of both faces, and get the respective affine transformation matrices for each face to warp into the average face.

With the affine transformation matrices in hand, we can now do the morphing! We utilize the fact that a smooth morph will involve a changing "average" face. In the beginning, the average face is just the original face, by the middle, it's a half-half mix of both, and in the end, it's just the last image! Below you can see the triangulations for each image, the "midway" face, and the final morph sequence!

Image 1 Triangulation Image 2 Triangulation Midway Face Morph Sequence

2. Mean Face of Population

I decided to use the Danish facial database for my population. Averaging the male faces naively doesn't algin them well, so to get a true average, I needed to line up their features. I did this by taking their annotated triangulations, averaging them to get an average geometric shape, and then morphing every image into that shape. Averaging those images together led to a much better average face.

Average Face Face Morphed to Average Geometry Face Morphed to Average Geometry Face Morphed to Average Geometry

3. Caricatures

Now that I have the average geometry of a male Danish computer scientist, I can see what happens if I morph my own face to that geometry. To make things even crazier, I can overcompensate for this by warping my face extremely. This is done by harnessing a cool fact: the difference between my face and the average geometry is essentially how "special" my face is from the average. So, if I take this difference and add it back at different intensities, then I can get exaggerated features in my face.

Original Average Morphed to My Geometry Morphed to Average Geometry Caricature (Morphed Beyond Average)

4. Bells and Whistles

4.1 Family Tree

I morphed my face into my brother's, and then his face into our father's

Image 1 Triangulation Image 2 Triangulation Midway Face Morph Sequence

4.2 A World of Sean's

Here's what I would (supposedly) look like if I were a different ethnicity!

Ethnicity Average Face Shape Morph Appearance Morph Total Morph
Chinese
Swedish