CS194-26 Project 4

Isabel Zhang: cs194-adi


Project Overview

In this project, I created a morph sequence between two similar input images and learned how to compute caricatures. I really enjoyed this project (it was one of the motivating factors in taking this class).

Face Morphing

Implementation

  1. Take in 2 input images: A and B.
  2. Image A: Angelina Jolie
    Image B: George Clooney
  3. Define corresponding input points. In the following examples of Angelina Jolie and George Clooney, I defined 52 corresponding points. Note that order matters here.
  4. To find the morphed face at time t, find the weighted average of each point from image A and B: (1-t) * A_points + t * B_points. This generates the average points at t.
  5. Calculate Delaunay triangulation of the average face shape
  6. Midway face: t=0.5
    52 Chosen Points: Mislabeling in image for 28, 29
  7. For each triangle in the triangulation, compute the inverse affine transformation. This transformation is responsible for finding the correct corresponding source pixels from the original image. The inverse affine transformation is used so that each pixel in the average face shape image has a source (with no holes). The general idea here was that given two triangles tri_src, tri_tgt where tri_tgt was the average face shape triangle, the affine matrix needs to be calculated: A * tri_tgt = tri_src.
  8. Locally warp the images using the calculated affine matrix
  9. Make sure to locally warp twice to get the average face shape for both images
  10. Angelina with average face shape of Angelina and George
    George with average face shape of Angelina and George
  11. Take a weighted average of the two averaged images to get the final morph for time t.
  12. Midway face: t=0.5

Result Gif: 50 frames





Morphing Sequence: Mine to A Friend's

My Face
Midway Face
His Face
Slow Morph to My Friend

Mean Face of a Population

Here, I computed the average face shape of the population of Danish computer scientists and morphed some of their faces to the average face shape.

Average Dane
40m Original
14f Original
40m to Average Face Shape
14f to Average Face Shape

Now, I morph my face to the average Danish computer scientist's face geometry.

My Face to the Average Shape

Finally, I morph the average Danish computer scientist's face to my face geometry

Average Face to my face shape

Caricatures

Implementation

  1. I computed the average Danish Computer Scientist's Face as shown above
  2. I subtracted my face from the average to find the feature differences
  3. I extrapolated the differences to get the caricatures seen below

Differences seen: My eyes become increasingly arched. My cheeks and chin become much more sharper and well-defined.

Original
Scaled by 0.5
Scaled by 1
Scaled by 1


Morphing Through Time

Age 2, 5, 20


Morphing from Chinese to Dutch

Chinese to Dutch Woman