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.

bears

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

bears

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

bears

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

bears

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.

bears

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.

bears

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.

bears bears

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

bears bears

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

bears bears

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

bears Average face of the morphed faces.

bears My face warped into the average geometry.

bears 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.

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

bears Without caricature bears Caricature when alpha is -0.25 bears 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 :)

Link to video if it doesn't load https://www.youtube.com/watch?v=O3vouduLS3w.

Changing smile of a face

Another bells and whistles I implemented was making a face smile more. I computed the average smiling face by morphing smiling faces to their average shape and taking the average of the morphed smiling faces.

bears Before adding a smile. bears Average smiling face.

bears Morph just the shape bears Morph just the appearance

bears Morphing both