CS 194-26: Image Manipulation and Computational Photography, Fall 2017

Project 4: Face Morphing

Arnav Vaid, CS194-26-acz



Part 1: Face Morphing

Face morphing is the smooth transition from one face to another, interpolating both face shape and image color across the morph. In order to morph face shapes, one must choose points for both images that match to corresponding image features (ex: ear lobes, jawline, eyes, mouth edges, etc). The following images illustrate what features were chosen for the morph. On the left is my face, on the right is my friend chris's handsome complexion:

Me Labeled Chris Labeled

Computing "Mid-Way" Face

If it was possible for Chris and I to have a child together, I'd like to know what the baby would look like. In order to do this we'd like to compute a mean shape. This mean shape can be computed by merely averaging the corresponding point locations together. We can compute a Delaunay triangulation on this mean shape. For each triangle computed, we want to find a transformation that maps the corresponding points in the mean-shape triangle to either one of the original image shapes. We can find this triangulation via the following equation:

             AtP't = Pt        (1)
      [a b c][x'1 x'2 x'3]   [x1 x2 x3]
      [d e f][y'1 y'2 y'3] = [y1 y2 y3]
      [0 0 1][1   1   1 ]   [1  1  1 ]
    

Where t denotes the triangle number and every column of P and P' denotes a point of the triangle in the source and mean shape respectively (the subscript denotes point 1, 2, or 3). Once we find the transformation, we can map every pixel for triangle t in the source image to contruct the average image using the inverse of A. Using this method, I'm able to achieve this result for the simulation of our baby:

Arnav Average Image Chris

Creating the Morph Sequence

The method outlined for the mean image used an equal weighing of both images' shapes to construct an intermediate - however, the same can be done for unbalenced weightings. By computing the intermediate images using weights sampled linearly from a range between 0 and 1, I was able to create a smooth morph video:

Arnav
Chris
Arnav Average Danish Face

Part 2: "Mean Face" of a Population

With access to a Danish face dataset, one can visualize the average face in the following manner. First, you'd compute the shapes of every face in the data set, and then average them together. Next, you warp every face to the average shape in the same way it was done in the last part. I provided three of these warped faces below/ Once you have these warped faces, you average the pixel values of all those images to obtain the 'average face'. I computed the male-specific average face of the Danish dataset.

Warped Male #1 Warped Male #2 Warped Male #3 Average Male Face

The image on the left is my face warped to the average Dane male, and the right is the average Dane male's face warped to my face.

Arnav Warped Average Dane Warped

Caricatures

Here are some attempts at making caricatures of myself. The way this was done was computing the average shape between my face and the Danish mean face, and the computing the difference between my shape and the Danish one. Then, the difference was scaled by a distortion factor and added back to the mean shape. My face was then warped to the mean shape. Negative coefficients exagerate the reference shape, whereas coefficients about 1.0 exagerate the my shape.

Arnav but more Danish Arnav but less Danish

Part 3: Bells and Whistles

Here's a face morph video I participated in with my classmates. My contribution can be seen at roughly 0:09 in the video:

 

Face Morphing Music Video