Face Morphing

Nancy Shaw, cs194-26-abo
CS 194-26 Spring 2020
In this project, we will morph images together and determine mean facial images. This is done through interpolating and extrapolating between faces as image matrices. Keypoints are defined on each face, which help us determine midway keypoints. These keypoints are tesselated into a Delaunay triangulation, which is fundamental for our warping procedures.

Morphing


Defining Correspondences

A morph is a simultaneous warp of the image shape and a cross-dissolve of the image colors. To complete a warp, we want a triangulation of the average keypoints between both images. Below, we see the Delaunay triangulation on the average keypoints of both images, and the same triangulation applied on to both images.

Triangulation of Average
Triangulation applied on George
Triangulation applied on Obama

Computing the "Mid-way" Face

To complete the warp from each original image to the hybrid, we need to transform each triangle patch in the source triangulation to the corresponding mean triangle. This is done through an affine transform. We want compute the affine transformation from each triangle in the source triangulation, then apply it to get the corresponding coordinate in the mean triangulation image space. However, since we want to avoid splatting (caused by forward warping), we instead do an inverse warp, finding the affine transformation from the average image to the sources and applying the inverted affine transform. We then take the pixels from each triangle of both sources and cross-dissolve them. Below are the original George and Obama images, and their midpoint.

Morph Sequence

From here, we just linearly interpolate between the warp fraction and the dissolve fraction to create the morph sequence. By concatenating these frames, we can create a gif of facial morphing.



Mean Face of Population


We used the Danish dataset to calculate the mean female face of the population. There were only 7 source images, but the resulting average still came out to be pretty well. We calculated the average face geometry by simply averaging all the points and triangulating the resultant mean points. The triangulation is used to warp each of the faces into the average face shape. Then we stack these images together. Below is the average face and some examples of the warped images.


We tried to warp my face to the average Danish female face, and we also tried to warp the average Danish female face to mine. Below are the results.

Me
Me Warped to the Average Female Face
The Average Female Face Warped to Me

Caricatures


A caricature is basically an exaggerated verision of a person; we will try to exaggerate features by pushing towards or away from some triangulation. We can treat the difference between a face and the average as a vector subtraction (Face X - subpopulation average). If we add this difference back into the averaged keypoints at different weights, we can create various levels of caricaturization. The second caricature did not turn out probably because my head and the source's head sizes varied a lot, and the keypoints did not record the top of my head well.

Original
Caricature Away from Mean
Caricature Towards the Mean

Bells and Whistles


Adding a Smile

Here we tried adding a smile to my face using the average male smiling face from the Danish dataset. With low weights, the impact is sleight-- a smile barely forms on my face. With higher weights, I get a smile but the image is a little distorted because my keypoints for the image is not very good (the head sizes differ a lot).


Original
Slight Smiling
Extreme Smiling

Class Face Morph

I also participated in a class face morph!




Kpop-themed Morph Music Video

I thought it would be fun to do a little morph music video. Some of the morphs can probably be improved by picking better keypoints.