CS 194-26 Project 3: Face Morphing

Ikram Magzoub, Fall 2020

Part 1: Defining Correspondence

For this part of my project, we need to define pairs of corresponding points on two images. I defined 50 points all over the face making sure to highlight main features such as the eyes, nose, mouth, face boundaries, and corners of the image.

Original Anne image

Original Emma image

Anne correspondence pts

Emma correspondence pts

Part 2: Computing the "Mid-way Face" and The Morph Sequence

2.1: Midway Image

In order to compute the midway face, we need to compute the average shape of the two sets of correspondence points. After that we compute the Delaunay triangulation and warp both images separately with the average shape. I then cross dissolved the warped images to produce the following midway image

Original Anne Image

Morphed Image

Original Emma Image

As you can see, both actresses have very similar features which made the morphed image look not too shocking.

2.2: Morphe Sequence

Once I figured out how to compute the midway image, I simply computed the midway image with different warp and cross dissolving values. I chose to compute the midway image from 0-1 in step size of 1/45. This produced 45 total frames which I then used to create a gif of the morphing sequence.

Part 3: The Mean Face of A Population

I computed the “mean face” of a population of all 33 male Danish scientists at their neutral face state. I took the average of the pre annotated points from the asf files, and then warped all of the faces into the average shape.

Here are a few samples of the warped images:

Sample warped Danish man 1

Sample warped Danish man 2

I then used all the warped images to create the mean face shown below and was able to warp my face into Dane’s average face and vice versa:

Avg shape

Avg shape warped to my geometry

My face

Part 4: Caricatures

Unfortunately, I was unable to completely produce an image for this portion due to a bug caused by matrix shapes. However, the basic idea here would be to wrap my face with the summation of my face’s shape and the difference vector from the mean face. We also have to weigh my face’s shape with a hyperparameter in order to accentuate the difference in my face’s shape and the mean population. Below is the best accentuation I was able to get without running into the sapping error.

Part 5: Bells & Whistles

5.1: Morphing Music Video on Theme

For the Bells & Whistles section, I decided to make a morphing music video with a black women theme. It’s a video that appreciates great black women and role models to me. Please find the video at this link: https://youtu.be/gm0NG85gAGM

5.2: Classmates Morphing Music Video

I also chose to partner with a few classmates to create a morphing video of all of us. We also added fun music to the background! Hope you enjoy it. Here is the link: https://youtu.be/udSyF3t_r3s

5.3: Changing Into a White Man (Different gender and race)

For this propart, I tried to change my face into the average white male. In this case, I was trying to change both gender and race. Below are my results, however, this was a failure case since the images were too different. I thought it would still be interesting to show

Avg white man

Morphed

My face

Conclusion

Overall, this was an extremely fun project to do, yet it was also very challenging at times.! I learned a lot more about linear algebra as well as images. The most interesting part was the morphing function and seeing it working properly.