CS 194-26 Project 2: Face Morphing

Xidong Wu

Overview

In this project, I will present the morph animation of my face into George and other's face, the mean of men and women faces and extrpolating from the men mean to create a caricature of myself.

Part 1: Correspondence point and Triangulation

Before we morph faces, we need to label the key points as feature and then to provide a triangulation of these points used for morphing. The Delaunay triangulation is used to generate triangle.

Delaunay Triangles and corresponding points

Part 2: Computing the "Mid-way Face"

After picking up the points on two original images, the triangles are generated from middle points of two sets. Then we can calculate the affine transformation matrix using corresponding trangles. With And the affine transformation matrix, two images are shaped into mid sahep. Finally, we can average two results to generate the mid-way face.

Original images

Mid-way Face

Part 3: The Morph Sequence

Based on the method introduced in Part2, I generate the morph sequence starting from my face to George's face. For each frame in a loop, we weighted average two images with alpha from 0 to 1, When alpha is 0.5, it is equal to the mid-way face in Part 2. [3]

morph sequence with 50 frames

Part 4: The "Mean face" of a population

In this part, I choose FEI Face Database as dataset of annotated faces. I choose 20 men images and 20 women images to gemerate 2 groups of mean face.

Corresponding feature points (54 points)

I pick up points on each image. With these points, I can calculate mean points as well as Affine Transformation matrix for each one in group of 20 images. The mean of men images and women images are listed below.

Mean face of men images(20 images)

Mean face of women images(20 images)

The examples from group of women faces are shown here.

original faces 1

original faces 2

original faces 3

morphed faces 1

morphed faces 2

morphed faces 3

Finally, these images shows the my face warped into the average geometry, and the average men face warped into my geometry. In order to match my face size to the dimension of FEI face images, my face image is cropped.

points and face triangles

My face to Mean face

Mean face to My shape

Part 5: Caricatures: Extrapolating from the mean

In this part, I produced a caricature of my face by extrapolating from the men mean face.

alpha = -0.6

alpha = -0.3

alpha = 1.2

alpha = 1.5

PBells and Whistles

Change gender of my face

Based on the previous part, I got the mean face of men and women. If I add the gap between the women and men, more female features will be put on my face. Namely, res = my face + alpha * (women mean face - men mean face). For convnience, I convert my face into gray scale. As alpha increase, we could see the shape of eyebrow, mouth and nose change.

Alpha = 1

Alpha = 2

Alpha = 3

Alpha = 5

References

[1] https://www.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab