CS 194-26 Project 3: Face Morphing

Name: Suhn Hyoung Kim

Project Overview

In this project, our goal was to morph from one face to another using warping techniques through methods like triangulation.

Defining Correspondences

In order to define the correspondences between the images, I manually selected the correspondence points with ginput on similar locations on both images in the same order. Then I used the function Delaunay from scipy.spatial in order to build the triangular meshes.

Me
Cha Eun Woo (Korean Celebrity)
Me Triangulation
Cha Eun Woo Triangulation

Computing the "Mid-Way Face"

For computing the mid-way face, we began first by finding the triangulation based on the mean of the correspondence points for both the source and the target faces with Delanuay. Then we needed to warp both images to the average face. To do this we first have to calculate the transformation matrix between the source points and destination points, we can then capture all the values from the destination to modify using polygon and then perform an inverse transform of all the pixels in the average triangle. Then after warping both the source and the destination image to the average face, we can cross dissolve the two together equally to get the mid-way face.

Me to Mid-Way Face
Cha Eun Woo to Mid-Way Face
Mid-Way Face

The Morph Sequence

Calculating the morph sequence was essentially the same as calculating the mid-way, but instead of equally weighting both images, I used np.linalg.linspace to generate equally separated fractions between 0 and 1 that could be used to act as differing weights of how much to weight the images when cross_dissolving. Then I used a gif maker to put all the images in a sequence to generate the below results.

Morph Sequence from Eunwoo to Me
Morph Sequence from Me to Eunwoo

The "Mean Face" of a Population

In order to generate the "mean face" of a population, I first took images from the FEI Face Database that were spatially normalized and front facing. The dataset came with prelabeled points to use for triangulation, so I took the average of these correspondence points to generate a triangulation like before. Then I warped all of the images to the average and the cross_dissolved them to generate the mean face.

Mean Face of Population

Below are some images of individuals from the population warped to the mean face.

Original 1
Original 1 to Mean
Original 2
Original 2 to Mean
Original 3
Original 3 to Mean

I also tried morphing my face into the population mean and the population mean into my own face.

Self to Mean
Mean To Self

Caricatures: Extrapolating from the Mean

In order to create caricatures, I used similar methods to before, but instead of using weights within the range of 0 to 1, I used weights outside of those ranges.

Caricature with Alpha = 1.2
Caricature with Alpha = 1.5

Bells and Whistles

For my bells and whistles, I found a dataset with the average korean woman face, so I attempted to warp my face to look more feminine.

Me
Average Korean Woman
My Face Warped to Average Korean Woman Mid-Way
Mid-Way Between Me and Average Korean Woman