CS194-26

Project 4: Face Morphing

Samantha Lai | cs194-26-afr

Morph: EECS Faculty (click for music video)
Morph: Me + Emma Watson

In this project, we created combinations and morph sequences between faces. We used cross dissolves and interpolations of affine transformations between different faces to achieve smooth transitions.

Bells and Whistles: Morphing Music Video on a Theme


Here is a music video of a morph between some professors in the EECS department at UC Berkeley. I set it to some interesting audio and tried to make the face morphing line up with every 4-count of the music. The music is 143 bpm, which comes out to 0.419 seconds per beat and 1.67 seconds per 4-count. This means that the transition from one professor to the next must happen in 1.67 seconds. Since I had 45 photos for each transition, so each photo should be displayed for 37.29604 milliseconds. This works for the first few 4-counts but gets a little bit off-beat, probably because of some rounding problems in the gif making.
Professors in order: Hilfinger, Denero, Hug, Raghavendra, Garg, Liu, Asanovic, Katz, Sahai, Efros.

Click for video with sound ;)

Here are the midway images between each of the faculty. Some worked better than others (I think Hilfero, Denerao, and Rug look the best), and the fact that the images were originally 150 x 210 pixels did not help with the quality of the results. In Sahai's image, he is looking in the opposite direction than the the rest of the professors, which is why the midway images between Katz/Sahai and Sahai/Efros look so strange. In the gif of the morph, they are little more excusable as the individual frames are less visible.

Hilfero
Denerao
Rug
Hughavendra
Ragarg
Gliu
Liusanovic
Asanovatz
Kahai
Safros
Efringer
Hilfero

Part 1: Computing the Mid-Way Face

I used the points provided by Professor Efros for almost all of the morphs, except for the morph to the mean of a population, where I used the points that were defined by the creators of the Danish face database. For any morph between two faces, I calculated the midpoint between each pair of corresponding points and calculated the Delaunay triangulation between all of the midway points. These images are the result of a warp that is exactly halfway between the two faces and a cross dissolve that is also exactly half way between the faces.

I noticed that the midway image between Daniel Radcliffe and Emma Watson looks much more realistic than the midway image between me and Emma Watson. This is likely due to the fact that the lighting in the pictures of Daniel and Emma are taken with almost identical professional lighting at the exact same camera angle, while my photo was taken in my poorly lit bedroom with the front facing camera of my iPhone 7 and a slightly downward angle.

Above: Halfway between Emma Watson and Daniel Radcliffe


Above: Halfway between Emma Watson and me



Part 2: The Morph Sequence

Creating the morph sequence is essentially the same as calculating the midway image, except that I had to vary how much I wanted each frame to look like Image 1 vs Image 2. The first image in the sequence is identical to Image 1, and the last image is identical to Image 2. The images in between are morphed to sequentially include less and less of Image 1 and more and more of Image 2.

Daniel + Emma
Me + Emma



Part 3: The "Mean Face" of a population

WARNING: Slightly traumatic pictures ahead

In this part of the project, I computed the mean points of correspondence of a population and morphed each individual to the population average one by one. Then, I averaged all of the morphed images together to arrive at a mean face for the population.

Some individuals look ok after morphing.
Some individuals are a little off but still passable.
Some individuals are just not ok.


However, after averaging, everyone looks a bit more normal. On the left is the average of all the people (male and female) in the Danes dataset. The right is an average of just the females. The results turned out better than I thought they would, especially for the female only average, which only includes 7 individuals.

Average of All Smiling Danes
Average of Female Smiling Danes


I first tried morphing my face to the mean of all the Danes, but the result was so horrendous that I chose not to include it on this website. I then tried morphing to just the female Danes, in the hopes that using an average with more feminine features would make the resulting images less terrifying. This is not to say that they are not still terrifying, but the facial features look a bit more normal.

Before morphing to each other's geometries
Morphed to each other's geometries

Why did this fail?

I think this would have worked a lot better if I had found a dataset of East Asian females, since my facial geometry is so dramatically different from the Danes. To test this, I got an average Chinese female face off of Google and repeated the same process to warp my face to this average and vice versa. This gave a dramatically improved result (by dramatically improved, I mean it actually looks more like a real person and not nightmarish).

Before morphing to each other's geometries
Morphed to each other's geometries


Part 4: Caricatures - Extrapolating from the mean


Previously, after finding the affine transformation needed to warp one face to another, we warped one face closer to the other. Here, we instead warp a face away from the other, and since the other face is an average, we are essentially accentuating the feature that make a face unique. This is how we can create caricatures. I first computed the caricature of my face based on the Danes. Then, since this should work better with a face that looks more similar to mine, I repeated this using the average Chinese female face. Interestingly, I think the first caricature turned out better.


Caricature from Danes: Leftmost is original, and the next three are respectively adding back 0.3, 0.6, and 0.9 of the differences between my face and the mean.

Caricature from Chinese female: Leftmost is original, and the next three are respectively adding back 0.3, 0.6, and 0.9 of the differences between my face and the mean.