# Project 3: Face Morphing

CS 194

By Won Ryu

### Overview

This project was on morphing images, in particular faces. When we can morph faces, we can do warping on one face to a different face in a smooth transition. We can also use it to align faces so that when computing an average face, the average does not become blurry. We can also use morphing to have more of a particular feature of a face such as a smile.

### Defining Correspondences and Triangulation

In order for morphing between two faces to be possible, we need to first define the points of correspondences between each face in order to map eyes to eyes, mouth to mouth, chin to chin, ears to ears and etc. Then to make sure our transformations are at most affine, we form triangles between the points. In order to not produce overly skinny triangles, Delaunay triangulation was used and the triangulation was done on the mean of the correspondence point sets of the two images.

The image shows the face that it'll transform from.

The image shows the face that it'll transform from with triangulation.

The image shows the face that it'll transform to.

The image shows the face that it'll transform to with triangulation.

### Mid-way Face

The mid-way face between two faces was formed by first computing the average shape which was the average of each corresponding keypoint location in the two faces then warping both faces into that shape, and finally averaging the colors together.

The image shows the mid way face between the two faces.

### Morph Sequence

To create the morph sequence, I created 46 image frames labeled 0 to 45 where each frame was its label number / 45 one image and (1 - label number / 45) the other image in terms of warped shape and pixel value. These 46 images were put together where each frame was displayed for 1/30 of a second.

The face morph sequence.

### The "Mean face" of a population

For the “mean face”, the dataset of frontal images that were spatially normalized and the points selected on the faces were used. (https://fei.edu.br/~cet/facedatabase.html)

To find the mean face, the average face shape (the points selected on the faces) of the dataset was computed. Then each of the faces in the dataset were morphed into the average shape. Lastly, the average face of the population was computed with the morphed faces.

Example of a face morphed into average face shape. (left is before morph and right is after morpth)

Example of a face morphed into average face shape. (left is before morph and right is after morpth)

Example of a face morphed into average face shape. (left is before morph and right is after morpth)

Average face of the morphed faces.

My face warped into the average geometry.

The average face warped into my geometry.

### Caricatures: Extrapolating from the mean

Caricatures of my face were formed by extrapolating from the population mean that was found. Alpha would be the weight of the difference between my image and the mean image that is being added on to the mean image to find the shape to warp to.

Without caricature Caricature when alpha is 1.25 Caricature when alpha is 1.5

Without caricature Caricature when alpha is -0.25 Caricature when alpha is -0.5

### Bells And Whistles

#### Face-morphing music video of the students in the class

I also made a face morph in similar methods of the morph I made earlier to another student in the class. Roma Desai, Jason Wang, Jenny Song, Ankit Agarwal, Won Ryu, Briana Zhang, April Sin, Tushar Sharma, Michael Wang, Ja (Thanakul) Wattanawong, William Loo, Gary Yang, Chendi Wu, Sophia Yan, Jun Gao, Mengti Sun, Ruochen Liu, Xingyu Jin, Lucy Wang, Ken Guan, and Ke Huang all did the same and all the morphs were stitched together to a background music of Michael Jackson’s Black or White in honor of his music video :)