Project Overview

Project 3 of UC Berkeley's CS194-26 course deals with facing morphing: the act of morphing between two images based on pre-defined correspondence points. For this assignment, I've produced a "morph" animation of my face into the face of Cristiano Ronaldo, computed the mean Brazilian face (FEI Face Database) and extrapolated from that mean Brazilian face to create a caricature of me. Additionally, I changed the gender of Olivia Rodrigo by blending her face to the average American male face.

Defining Correspondences

In order for the image morphing process to be effective, I needed to first define correspondence points between each image. To do so, I implemented a series of utility functions that made use of `matplotlib`'s `ginput`. I first annotated my image with its correspondence points and then wrote each of the (x,y) pairs to coordinate files. I repeated the procedure for the image of Cristiano Ronaldo.

Delaunay Triangulation

In order to produce the triangulation for each of the images, I made use of `scipy`'s `Delaunay` function. The triangulations are shown below:

Computing the "Mid-Way Face"

Using each image's triangulation and the mean shape (i.e. mean (x,y) point for each correspondence point), I computed the "mid-way" face between Cristiano Ronaldo and I. The results are shown below.

The Morph Sequence

To show the morph sequence between the two images, I computed a series of 50 morphed images, each with different hyperparameters set (i.e. `warp_frac` and `dissolve_frac`).

The "Mean Face" of a Population

Rather than morphing two images together, we can use similar techniques as shown above to find the "mean face" for a given population. I used the Brazilian FEI Face Database to compute the Brazilian "mean face". Since correspondence points were only provided for grayscale images of each individual, this part of the project was done entirely in grayscale. Given a new data set with color images and their correspondence points, the same code would produce a color-version of the "mean face".

Morphing Individuals to the Mean

We can morph any individual to the mean face geometry as we did above. To do so, I used the pre-determined correspondence points for two sample individuals.

Caricatures: Extrapolating from the Mean

To showcase how my face differs from the average Brazilian face, I computed a difference vector between the correspondence points of my face versus the mean correspondence points of all faces in the FEI Face Database. Then, I extrapolated my unique features by adding this difference back to my face, resulting in a "caricature" of myself. My face is unnaturally skinny and my eyebrows are quite large. I've shown GigaChad as well since I was told that the two of us have a striking resemblance.

Bells and Whistles: Changing Gender

For extra credit, I decided to morph rising pop star Olivia Rodrigo's face into the Average American male face. To do so, I found two reference images online, used by correspondence utility functions to label each image, then morphed the two together as above, thus changing the gender of Olivia.