CS 194-26: Fall 2021

Project 3

Gina Condotti



Overview

In this project I learned how to morph faces together using triangulation. I was able to morph from one face to another, ccompute the average face of a population, and create some fun images!

Details

Part I: Defining Correspondences

In order to create a transformation from one face to another, I created two sets of corresponding points (one for each image) to identify each person's key features. For my images, I used photos of Taylor Swift and Anne Hathaway, taken by photographer Martin Schoeller. I created my own guide to ensure that I labelled the faces consistently.

Point-Selection Guide

Using my chosen points, I found the mean of the two data sets. Then I computed a Delaunay triangulation on the mean to reduce triangle deformations. Delaunay triangulation allowed me to convert my set of points into a set of contiguous, non-overlapping triangles.

Part II: Computing the "Mid-Way Face"

Before I was able to create the morphing sequence from one image to the other, I first had to find the "mid-way face," i.e. the face that is exactly half of each original face. I did this by warping both faces into the shape of the mean face calculated previously, and then averaging the result. This process involved computing an affine transformation matrix so that I could map points from the Delaunay triangulation back to my original images (inverse warp). Once I mapped back to a point in my original image, I implemented a bilinear interpolation function to get the RGB value from the four nearest pixels to define the corresponding color in my warped image.

Taylor Swift
Mid-way Face
Anne Hathaway

Part III: The Morph Sequence

Using weighted averages, I created an array of images to make a fluid animation from Taylor's face to Anne's face. Depending on how much weight I gave to Taylor's images vs. Anne's, I was able to control how much influence their features had on each resulting image.

Part IV: The "Mean Face" of a Population

Expanding upon the "mid-way face" that I computed above, I applied the same concept to a collection of images found here to compute the mean face of a population. Based on the main demographic of the data, I decided to limit it to photos of male subjects.

Here are a couple of the original images:

Here are those same faces morphed into the average shape:

And here is the average face of the population:

Mean Face of the Population

And lastly I warped my face to the average geometry, and warp the average face to my geometry:

Me Warped to Pop. Geometry
Pop. Warped to My Geometry

Part V: Caricatures

I generated caricatures by extrapolating from the mean image of the population. I generated an image where my features were exaggerated by 200%, and where the features of the mean image were exaggerated by 200%

200% Me
200% Mean Pop.

Part VI: Bells and Whistles

For my bells and whistles portion of the project, I decided to create .GIF of my face transitioning between emotions. I took a couple pictures of my face (sad, confused, happy) and used similar techniques as morphing between different faces to morphing between different versions of my face. It was pretty fun and my friends got a good laugh out of the .GIF that I sent them!