CS 194-26 Fall 2021 - Project 3

Face Morphing

George Gikas


Defining Correspondences

To define the correspondences, I mapped out points on both an image of myself and an image of my friend Rohan (thanks Rohan!). Following the definition of points, I used scipy's delaunay function to compute a triangulation of points for the halfway image. Below are the images with the points plotted on them, as well as the triangulation:

Points/triangulation for George
Points/triangulation for Rohan

Computing the "Mid-Way face"

To perform an affine warp backwards, we must solve for the inverse transformation matrix. To do this, multiply the point matrix for image 1 with the inverse of the point matrix for image 2. Using this, we can find corresponding points for a polygon of img2 within img1. Using this, we can then compute the midway image, which is shown below:

Halfway image

The Morph Sequence

Using the concept of halfway images, we can compute a series of partway images that start at the end of one image and gradually move over to the other image. This series of images can then be combined into a gif to show a gradual morphing between two people:
Gif of morph between myself and Rohan

The "Mean Face" of a population

For this problem, I computed the mean of the Danes dataset by averaging the correspondence points for all images in the set. I then morphed each individual image into the average shape. Following this, I summed all the images then averaged them to produce the mean image:

Image 21 of dataset
Image 25 of dataset
Image 28 of dataset
Image 36 of dataset
Mean face of the dataset

Following this, I morphed my face into the shape of the average face in the dataset, and also morphed the mean image into the shape of my face:

My face morphed into the average
Mean face morphed into me

Caricatures: Extrapolating from the mean

To create a caricature of myself, I morphed my image to the shape of said image modified by the difference betweem itself and the average shape of the Danes dataset. As a result, the image is being warped to a shape that incorporates itself, but has been caricaturized by the inclusion of the average from the dataset:

Caricature of myself with the mean of the Danes dataset

Bells and whistles: changing my age

For the bells and whistles portion of this project, I took the average image for an infant and morphed myself to it. I separately morphed myself to the shape of the baby face, to the appearance of the baby face (done by morphing the baby to myself with the colors), and to both:

Morphing to the shape of the baby
Morphing to the appearance of the baby
Morphing to both shape and appearance

Image Credits

https://i.pinimg.com/originals/27/0b/d5/270bd529a4ea04cee6ed85d66335827e.jpg