CS 194: Image Manipulation and Computational Photography, Fall 2020

Project 3: Face Morphing

Rami Mostafa, cs194-26-abo


For this project, I got to experiment with applying a variety of changes to images of peoples' faces by morphing them into other people, or creating an average face for a population.

Defining Correspondences

To start the project, I first had to decide what key points I would be using for my images. I decided to use the same key points as the imm face dataset. The order of the points I chose were as follows: 13 along the bottom of the face (from left ear to right ear), 8 for the right eye, 8 for the left eye, 5 for the right eyebrow, 5 for the left eyebrow, 8 for the lips and 11 for the nose. I added an additionaly 4 points for the 4 corners of each image to make computation more seemless.

Delaunay Triangulation on George Image

Delaunay Triangulation on Zain Image

Computing the "Mid-way Face"

After selecting the key points in each image, we can compute the "mid-way face." Each point is averaged with the corresponding point in each image. With these average points, we can compute the affine matrices needed to transform the triangles in the original images to the triangles created by the average points. Then we do a cross-disolve of the pixel values to generate the color of the resulting image.

Original Face of George

Midway Face of George and Zain

Original Face of Zain

The Morph Sequence

Similar to computing the "mid-way face," now we had the tools to generate the entire morph sequence. All we needed to do was compute the morphed faceat each step of the sequence similar to how we computed the mid-way face. In this case, there was meant to be 45 frames, so we had 43 different steps to compute (plus the start and end images).

The morph video can be found here

The "Mean face" of a Population

I chose to use the Danes dataset for this section. I decided to compute the mean face of all of the males in the dataset who took a colored picture with a neutral face. In doing so I computed the below mean face.

Mean Neutral Male Face

Additionally, to see how much I differed from the computed mean, I warped my face using the geometry of the mean, and also warped the mean face using the geometry of my face to get the below results.

My Face with Average Geometry Structure

Average Male Face with Geometry Structure of My Face

Caricatures: Extrapolating from the mean

Via a similar process as the section above, I was able to extrapolate the difference between my face and the average face to produce a caricature of my face with exaggerated features as shown below.

Caricature of My Face

Bells and Whistles

For bells and whistles I chose to do a morph of my face with my female friends face, thereby changing the gender of the subject via the morph. Below I have displayed the warp of my face with the facial structure of my friend, and the warp of her face with my facial structure.

Me with the Facial Structure of my Femal Friend

My Friend with My Facial Structure

Additionally, you can see the mid-way face of my friend and I.

My Original Image

Mid-Way Face of My Friend and i

My Friend's Original Image

Finally, I created a gif of the general morph of my face into my friends face, thereby morphing myself into a beautiful female.

The morph video from me to my friend can be found here