Face Morphing

Nerissa Lin CS194-26-adv

Overview

In this project we use our learned knowledge of affine transformations to morph images together, resulting in some pretty cool gifs of faces seemingly morphing into each other. We take photos where we can pick out the items that should line up - eyes to eyes, nose to nose etc. Once this has been defined, we can begin the morph. Wecan achieve this through calculating some mean shape and then transitioning the image into that shape, similarly, mapping the colors from the original image onto the final image and lastly, we can abstract this to learn about the average face of a population or features that are unique to a group, playing upon this to lastly form caricatures of people.


Defining Correspondences




We carefully select a range of features that are deemed significant to morph accurately - particularly, the hair, face, eyes, nose, mouth were all points of interest. It also helped when points along the hairline matched up with points of interest like the eyebrow for example, where this would generally make the entire face seem to be slightly more inline. Taking care in the selection can make a huge difference between what the final end image looks like.


Computing the "Mid-way Face"




Since we have the points of interest that should line up, we have to morph the faces to line up accordingly. Since it might look strange to morph one face entirely to another, we find a midway face, where the points of interests lie on the average of the source and target points. Then we morph each face to this shape and extrapolate the value of the points in the face to be from the points in the original image. That is if I've shifted my nose to the left by 3 pixels, the color of the pixel must be derived from the pixel shifted back by 3 on the original image. Lastly, we merge the two images that have been shape morphed by taking an average of the colors and this results in the midway face looking like both original images as seen above.


I personally loved being able to test out my theory that I look just like my best friend! Its shocking to see how little we actually have to change to look like each other...


Morph Sequence


If we choose the scaling factor at which we average the face shape and average the colors from the images - we can produce a slow transition from image 1 to 2. Using this technique we produce the two sequences above. We can see from the section before that it gets to the midway face before morphing to image 2 in a slow sequence.



Populations: Calculating the Mean Face




Average of the population



We're playing with the Danes dataset of faces. We take the population and choose our subset of choice: Women, and to derive an average. Above we show a few examples from the dataset. This works because the features that are similar between all the figures are persistant across the averages but anything else that is drastically different, is abstracted away as noise that get scaled to a negligible number. Below are some faces morphed to the average face shape:

Caricatures

Using the population mean, we can go ahead and take a negative scalar of the average - essentially making the person less and less like the average, removing all the average features. This creates a seemingly dramatic face. We show two faces, one at an -0.5 scale and the other, more dramatic at -0.9 scalar.




Bells and Whistles: Manipulating gender

We take an average of the female population, this average female face can be used to make other faces more feminine. We can take the image here for example and try to shift it toward a more feminine face by adding it to original at a scaled value and see that the result seems to have more feminine features. We show a sample where only the shape is altered and then one where the colors are altered as well.