Face Morphing!

Using transformations and interpolation to morph faces!


Author: Nakul Srikanth

Part 1. Defining Correspondences


For this section, I chose an image of myself and an image of George Clooney to create a midpoint face and morph my face into George Clooney. First, I used a correspondence selection tool, implemented by a previous student, to obtain a .json file of all the correspondance points for the two images that I wanted to morph. Then, I used the Delaunay triangulation algorithm to create a triangular mesh shape for the images.

Part 2. Computing the "Mid-way Face"


Utilizing our developments from the previous section, I used the correspondance points from both images to find the midpoints (average of the correspondances) between the two images. Using these midpoints, I used the same triangulation algorithm to obtain a midpoint triangulation mesh shape. Now using this midpoint shape and the two original image shapes, I first found the affine transformation between an original image and the midpont. I then used the inverse warp from the midpoint to the original image to obtain pixels in the original image that are warped in the midpoint image. I then used bilinar interpolation to estimate pixels values from the original image to the midpoint image. I repeated the process for the second image and then average the color by cross-dissolving them. The final result was a "Mid-way Face" between myself and George Clooney.


Another example with Bollywood actor, Shah Rukh Khan.

Part 3. The Morph Sequence


For the morph sequence, we just had to extend our code from the previous section, and create a function called morph() to reproduce all the steps from Step 2 for any two images. Using this function, we can then obtain a series of 20-50 morph images with warp_fractiion and dissolve_fraction, linearly increasing from [0, 1] in every sequence. Then putting all the morphed images together in a GIF file reproduces the morphing sequence.


Part 4. The "Mean face" of a population


Using the Braziliian Faces dataset, I used the ENTIRE population to create a mean face, using techniques from previous steps.

Screenshot 1

Mean Face


Part 5. Caricatures: Extrapolating from the mean


Using the mean face obtained from the previous steps, I have created some caricatures for different values of alpha. This is done by weighting the mean_face_pts by alpha and the normal_face_pt by (1-alpha) for various values of alpha.


Bells and Whistles: US Presidents Morph Sequence


Using the official portraits of US Presidents, I have created a morph sequence for all the presidents in the order that they were in office.