CS194-26 Project 4 - Alex Zhang

Overview

In this assignment, we explored using affine transforms on triangulations of human faces using human labels to perform morphs.

Mid-Way Face

For this part, I picked correspondences in both images and took the average of those points to get the 'average shape' of our faces. Below you can see the points I chose and their respective triangulations. Using the average shape, I warped both faces towards that and cross dissolved it. To do the warp, I used the triangulation of the average shape and computed the affine transformation for each triangle from the source image to the target (the average shape). By using an inverse warp with the computed affine transformation matrices, I was able to morph both images to the desired midway shape. Applying the cross dissolve was just taking the average of the two photos.
Me
Random Asian Dude
Halfway

Respective Triangulations of faces

Morph Sequence

After being able to compute the midway face, extending the procedure to compute the actual morph sequence was quite simple. The key was to stick with one consistent triangulation throughout the entire procedure, which was calculated from the average face. Then, in evenly spaced increments from 0 to 1, I interpolated the shapes of me and the target image using the current timestep value and also applied a cross fade with the timestep value too. Basically, both the cross fade and interpolated shape were a function of t*me + (1-t)*target. I used a step size of .05 and generated 21 images, which I stitched together using giphy.
Alex to random asian dude
Alex to George Clooney

Average Face

For this part, I read in the data points for each Danish computer scientist in the Danish data set and computed the average shape. I morphed each face to the average shape and took the average over all those photos.
Average Face of Danish Computer Scientists
Here are some examples of morphing individual scitentists to the average.

Original Faces

Faces Morphed to Average Geometry

My face and the mean

My face warped to the average geometry
Average face morphed to my face geometry

Caricatures

I subtracted the geometry of the average danish computer scientist from my face's geometry, multiplied it by various k, and added back my geometry to generate caricatures. Doing this exaggerates the differences between my features and the danish features and thus creates a cartoon-y looking picture. Here are the images for various values of k.
k=1.1
k=1.25
k=1.5

Bells & Whistles - Changing my own ethnicity

I found a photo of average black male online. By morphing the photo of the black male to my face shape and crossdissolving the two, I was able to change my skin tone without affecting the geometry of my face. By morphing my face to an interpolation of my geometry and the average black male face, I was able to alter just my geometry. Lastly, by combining these two techniques (not necessarily the same fraction for the cross dissolve and shape interpolation), I was able to to simulate changing my ethnicity.
Average Black Male
Me
Morphing just the appearance
Morphing just the shape
Morphing both shape and appearance