CS 180 Project 3: Face Morphing and Modelling a Photo Collection

In this project, I morphed some faces.

Part 1: Defining Correspondances

For this project, I implemented code for selecting facial keypoints with matplotlib's ginput function. In total, I used 30 points, including the 4 corners of the image. Here are the generated points and triangles for my blends of Barack Obama and Kamala Harris.
Barack Triangles Kamala Triangles

Part 2: Computing the Mid-Way Face

When blending together Barack Obama and Kamala Harris, this is the generated midway face.
Midway Face

Part 3: Morph Sequence

This is the process of blending together Barack Obama and Kamala Harris over 50 steps.
Morph

Part 4: Mean Face of a Population

I decided to use the Danes dataset to calculate the mean face of a population. Here is the average happy face:
Average Dane
Here are some happy Danish faces, warped into the average shape:
Average Dane 1 Average Dane 2 Average Dane 3 Average Dane 4 Average Dane 5
Here is Zendaya's face, warped into the Danish geometry, and vice versa.
Zendaya Warped

Part 5: Caricatures

In order to calulate a caricature of Zendaya's face, I calculated the difference between Zendaya's face shape and the average danish face shape. Then, to get an exaggerated Zendaya, I subtracted that difference from Zendaya's shape, and warped Zendaya to the new generated shape. Similarly, to calculate an exaggerated danish shape for Zendaya's face, I added on 0.1 times the difference to the averaged shape, and warped to those points. Here are the results:
Zendaya Caricature

Bells and Whistles: Morphing Music Movie

I created a morphing music video of the Friends characters.
If the embedded video gives you trouble, please vist https://youtube.com/embed/Mi3_D9rZRtA.

Bloopers

Here are some behind the scenes of warps before I finished fixing my code.
Shattered Barack Order of operations