Project 3: Face Morphing

Part 1: Defining Correspondences

In this section, I select corresponding points between two faces. These points define key facial features such as the outline of eyes, nose, mouth, etc. allowing us to establish a triangulation for morphing. In order do this, I used the tool linked on the project spec. The points shown below are what serve as a basis for computing a triangulation mesh using Delaunay Triangulation, I then use the triangulated correspondance points to comute a warp which is carried out in the next part. the face geometrically.

Points on Face 1

Points on Face 1

Points on Face 2

Points on Face 2

Points on Face 1

Points on Face 1

Points on Face 2

Points on Face 2

Part 2: Computing the "Mid-way Face"

In this section, I use the correspondance points from Part 1, to compute the average geometry between two faces by averaging their correspondances I then compute the affine transformation matrix to go from the triangulated geometry of the mid-way face to the original images. These matricies are then used to morph each of the faces into this mid-way shape. Then I carry out interpolation in order to set the color of the pixels in the images..

Points on Face 1

Face 1

Points on Face 2

Midway Face

Points on Face 2

Face 2

Points on Face 1

T&F: Khang

Points on Face 2

T&F: Khang+Chuk

Points on Face 2

T&F: Chuk

Part 3: The Morph Sequence

In this section, I generate a sequence of frames that gradually morphs one face into the other. The transition is controlled by linearly warping the geometry and cross dissolving the colors of the pixels, creating a smooth animation between the two faces. To accomplish this, I added a warp_factor and dissolve_factor parameter to my function that generates the mid-way face. Then, I created a range of these values from [0, 1] with 45 steps in order to create a transition with 45 frames. I then compiled all of these 45 frames into a gif to display the morphing sequenece.

Morph Sequence 1

Morph of Face 1 and 2

Morph Sequence 1

Morph of Face 1 and 2

Morph Sequence 3

Morph Sequence between Khang and a rat

Part 4: The "Mean Face" of a Population

In this section, I compute the average face of a population retreived from the dataset linked on the project spec (FEI face database). To accomplish this, I first average all of the correspondance points of all the images in the dataset in order to get the average shape. I then create a triangulation of this shape and warp all of the faces in the dataset to this geometry. I average all of the outputs at the end to get the "mean face" of the population at the end. by morphing several faces into the mean geometry of the group. I then define new correspondances on this mean face and my face in order to warp my face into that of the average of the population.

Mean Face

Examples of one face from the dataset.

Mean Face

Example face 2.

Mean Face

Example face 3.

Mean Face

Examples of faces warped into the the "Mean Face" of the Population.

Mean Face

The "Mean Face" of the Population

Individual Morph into Mean Face

My Face Morphed into the Mean Face and Mean Face Morphed into me.

Part 5: Caricatures: Extrapolating from the Mean

In this section, I create caricatures by extrapolating from the mean face. In order to do this, I utilized the same morphing function that I had, but I set the warp_factor = -0.5 to get more of my face's geometry and 1.5 to get more of the average face's geometry.

Caricature

Caricature by Extrapolating from the Mean Face

Part 6: Bells and Whistles: Changing Gender

In this section, I attempt to change the gender of my face by utilizing an image of the average Dutch woman. I define correspondances between this image and my image and then warp my face's geometry into the geometry of the average Dutch woman. I also warp the geometry of the average Dutch woman into my geomtry as well, and then morph both the shape and appearance.

Caricature

My face

Caricature

Average Face of Dutch Woman

Mean Face

Morphing just the shape

Individual Morph into Mean Face

Morphing just the appearance

Individual Morph into Mean Face

Result of no warp and some cross dissolve

Individual Morph into Mean Face

Morphing both shape and appearance

Individual Morph into Mean Face

Accidently set dissolve_factor=6.0 but it ended up looking cool so I decided to share it.