CS 194-26 Project 4 Face Morphing - Michelle Chen

Part 1: Morph Sequence and Mid-Way Face

For this project we tried to smoothly morph one face into another. To do this, we define correspondance points on each face that maps to a certain features. Then we get a weighted average of the two image points using a warp fraction as our weight. The averaged points are equal to (warp_frac) * pt1 + (1-warp_frac) * pt2. We then use Delaunay triangles computed on the average points to partition the image into triangles. Next, we compute affine transformation matrices from the source/target image to the weighted average image for every triangle. The equation we try to solve is Ap = p', where p' are the triangle points in the target image (average), and p are the triangle points in the original image (source/target). The affine tranformation matrix A = p' * p-1. To get the original points that map to the points in the weighted average shape, we use an inverse warp, where original points = A-1 * average points. We then copy the points from the original image into the corresponding coordinates in the weigthed average image.

To get the full morph sequence, we use 45 weights equally partitioned between [0,1], and compute the morphed face using a warp fraction equal to the weight, and cross-dissolve the target and source image by a dissolve fraction.

The mid way face is just the above logic with warp fraction and dissolve fraction equal to 0.5


Mid-Way Face (Me and my friend Katie)

My face
Mid-Way Face
Katie's Face

The Morph Sequence

Me to Katie


Part 2: The "Mean face" of a population

I used the Danes image set to create a mean face. I used only a subset of the images, specifically the male neutral faces (I also discarded the black and white images). To create the mean face, I first get feature points from all the images in the set. Then I average all of the points to get a set of average points. Finally, we morph every face towards the shape defined by the average points, and do an even cross-dissolving over all of the images.


The "Mean face" of Male neutral faces from the Danes set

I also warped my face towards the geometry of the mean face, and the mean face towards the geometry of my face. This used the same logic as the morph sequence by using affine transformation matrices and Delaunay triangles.


My face in the geometry of the Mean Face
The Mean Face in the geometry of my face


Part 3: Caricatures: Extrapolating from the mean

To generate caricatures, I took the difference between the points from my face and the average face, and added that distance to the average face, weighted by some factor k. This created a set of points that represented the average face with my features added as an extra weight. Then, I morphed my face into the shape defined by those set of points.


Caricature face

Caricature of my features added on top of the mean face from part 2


Part 4: Bells and Whistles

For the Bells and Whistles portion, I tried to change the gender of my face from female to male. I used the average face of a Chinese man, and used the same logic in the Mean Face problem to morph my face into the shape of the average man and morph the average man's face shape to mine.


Female to Male Morphed Shape

My face
Me to average Chinese male
Chinese average man
The average Chinese male to me

To generate a morphed appearance only, I cross-dissolved the images to change the appearance of my face towards that of the average Chinese man.


Female to Male Morphed Appearance

Me and Chinese Man Combined appearance

Finally, here's the mid-way face and the full morph sequence between me and the Chinese man


Mid-Way Face (Me and Chinese Man)

My face
Mid-Way Face
Chinese average man

Female to Male Morphed Appearance

Me and Chinese Man Morph