CS 194-26 Project 3: Face Morphing

Rohan Chilukuri

Defining Correspondences

I define keypoint correspondences between my face and my friend George's face using ginput to select the points in order. I found that placing points around the eyes, nose, mouth, eyebrows, the shape of the face, and the corners of the image produced good results in the next parts. The images below show the keypoints and the Delaunay triangulation on those points.

Rohan Correspondences
George Correspondences

Computing the "Mid-Way Face"

The midway face involves computing the average shape (average of each keypoint location in the two faces), warping both faces into that shape by warping each triangle with an affine transformation (used inverse warping - computed the inverse transformation matrix, an interpolation over the non-warped image, and got the interpolated color from the non-warped image for each pixel in each triangle of the warped image by applying the inverse transformation to the warped pixels and interpolating the result), and averaging the colors together.

Rohan
George
Rohan to George Midway Image

The Morph Sequence

The morph is computed by computing 46 frames of midway images at different levels of "midway". The level of midway is controlled by the warp_frac, which controls the shape warping amount, and dissolve_frac, which controls the color warping amount. In my case, I let the warp_frac equal the dissolve_frac, and let them range over 45 evenly spaced intervals from 0 to 1 (0 being completely my face, and 1 being completely George's face).

Rohan to George Morph

The "Mean Face" of a Population

The mean face of a population is computed by computing the average face shape of the population, morphing each face in the population to the average shape, and then averaging all of the morphed images together. Below, I took a picture in landscape orientation to match the orientation of the Danes dataset, and computed correspondences on it. Below that, I show the mean Dane face, my face warped to the mean Dane shape, and the mean Dane face warped to my face shape. Below that, can see a subset of the Danes dataset that I warped to the mean Dane shape. Note that the correspondences are defined at the eyebrows and below, and because my face is wider than the mean Dane face, it gets smaller below the eyebrows, but remains larger above.

Rohan Danes Orientation
Rohan Danes Mean Correspondences
Danes Mean
Rohan to Danes Mean Geometry
Danes Mean to Rohan Geometry

Caricatures: Extrapolating From the Mean

Using the mean Dane face, I extrapolated the shape of my face by tuning an alpha outside of the interpolation range [0, 1]. The caricature is created by warping the image to a point set computed by im_pts + alpha * (mean_shape - im_pts). Alpha values greater than 1 will emphasize Danish features (in my face, made my face skinnier below the eyebrows, and smaller lips and nose), and alpha values less than 0 will emphasize my features which aren't present in the mean Dane face (in my face, made my face wider below the eyebrows, and made my eyes larger).

Rohan to Danes Mean Caricature alpha = -1
Rohan to Danes Mean Caricature alpha = -0.5
Rohan to Danes Mean Caricature alpha = 1.5
Rohan to Danes Mean Caricature alpha = 2

Bells and Whistles

I used the mean Dane face to change my ethnicity to Danish. Below, I show the morph at the midway point between my face and the mean Dane face using just shape (morphed my face to the average between my face and the mean Dane face), just appearance (morphed the mean Dane face to my face and averaged color), and both shape and appearance.

Rohan to Danish Shape Morph
Rohan to Danish Appearance Morph
Rohan to Danish Shape and Color Morph