CS194-26 Project 4 - Face Morphing

Dorian Chan - aec

Part 1 - Defining Correspondences

For this part, I built a way to allow a user to define matching correspondences on two images at once. You can see a screenshot below:

Correspondences

The user first picks a point on the left, source image, and then picks the corresponding point on the right target image.

Now that we have the correspondences, we compute the average between the keypoints of both images, and use that average to create a triangulation of the keypoints.

Part 2 - Midway Face

Now that we have the triangulation, we can compute the midway face. First, we average the keypoints to get the mesh for the midway face. Next, for every triangle in the midway face, we compute the affine transformations from that triangle to the corresponding source and target triangles. Using those transformations, we can then get the corresponding color values. We average the calculated source and target color, and we get our output image! Below is an example of my face midway-morphed to Ryan Gosling:

Ryian

You can see the original images in Part 1.

Part 3 - Morphing

We take part 2 one step further. Instead of averaging, we can instead do every ratio from 0 to 1, and create a morph animation from my face to Ryan Gosling’s face!

Ryian

Part 4 - Mean Face

Using similar face morphing ideas, we can also calculate the average human face. Using this dataset, we compute the average human face by morphing all of the faces to the average face shape. Here’s Mark Zuckerberg and Hillary Clinton warped to the average face shape:

mark

hillary

Next, we average the color values, getting the average face:

Avg

I can also warp my own face to the average geometry, which looks pretty awkward…

Original:

me

My face, warped:

mewarped

It looks a little nicer when you warp the average face to my face geometry:

avgwarped

Part 5 - Caricatures

We can also extend our morph to create caricatures! You effectively morph your face with the average face, but using -1 as your ratio to accentuate your own face’s features. Here’s a caricature of my face:

mecaric

Bells and Whistles - Gender Bending

Again applying morphing, we can also gender bend a target portrait! The basic idea is that we compute the average male and female face, compute the difference, and add that difference to our target portrait.

Original:

me

Only shape:

shape

Only color:

shape

Shape and color:

shape

Bells and Whistles - Class Video

Check out our video here: