In this project, I will produce a "morph" of my own face into others' faces, find the average face in a dataset of faces, and create caricatures of myself through extrapolation.
In this part, I needed to manually define pairs of correspondences or points on the image of my face as well as George Clooney's.
I first took a picture of myself against a plain background and cropped it to be the same size as George's.
Using the correspondence labeling tool at this link, I labeled key points on both images in a consistent order.
When labeling, I tried to focus on areas like the eyes, ears, mouth, nose, and hair to achieve the best morph results.
Here are the triangulations of the points on both my face and George Clooney's which I attained using scipy.spatial.Delaunay
Before we can put together an entire morph sequence, we need to compute the mid-way face of me and George. First, we will compute the average shape which is found by taking the average of the labeled correspondence sets for both images. Next, we need to figure out where points in the average shape would come from in the original image for each triangle in the triangulation of the average shape. In order to perform this inverse warp, we first need to compute an affine transformation that will solve this equation:
I created a morph sequence which takes a weighted average of the two images and produces 45 frames with weighting from 0 to 1 rather than only 0.5 from the previous part.
I utilized the FEI face database of 200 aligned and labeled frontal face images to compute the average face of the population. I had to first go through the entire dataset and do some preprocessing to load all the images and compute the average shape.
In this part, I created caricatures of my face by extrapolating from the average face that I found in the previous part.
I first calculated the differences of my face shape from the average face shape.
Then, I scaled these differences by some alpha and added the product to my face shape to create a distorted, caricature like figure.
my_face_shape + alpha * (my_face_shape - average_face_shape)
Here are some of my results at varying alpha.
Increasing the alpha will increase the scaled difference in features so therefore the distortion that is applied to my face image will be greater which is observed in the results.
For Bells and Whistles, I wanted to try to morph my face with an average South Asian Female face I found online. I first had to resize my face image to be the same size as the female face and manually added correspondences on key facial features for both images.
To morph just the shape (warp), I warped my face onto the average female face. To morph just the appearance (cross-dissolve), I warped the average female on to my face. To morph both shape and appearance, I used my morph function (warp and cross-dissolve) with warp_frac = 0.5 and dissolve_frac = 0.5
I can notice that when I morphed both shape and appearance, it blends both very well. Increasing the warp_frac would give me more feminine features from the average female image and decreasing the warp_frac would give me more of my own features