Part 1: Morphing My Face

Defining Correspondences

To morph my face into Katie's face, I selected 62 points (4 of which were the 4 corners) for each image in the same order corresponding to the same facial features.

Then, I calculated the midway shape from averaging these two point sets and applied Delaunay triangulation to this midway shape to compute the triangulation. I then applied the output of running Delaunay to the original two images.

Me Katie the Bachelorette
Me with 62 points Me with triangulation Katie with 62 points Katie with triangulation

Midway Face

Computation Steps

1) Compute the average shape by averaging the two point sets from the two images. For the midway face, we just use (first_image_points + second_image_points) / 2.

2) Warp each face into the average shape by using affine transformations. For each triangle generated by Delaunay, we calculate the affine transformation matrix between the average point set and each of the two original image point sets.

3) Average the colors together to colorize the midpoint face. Since we are warping the trinagles to the midway image, which has not been colorized and is only currently a set of points, we need to average the colors of the two original images to determine the color of each pixel in the mid-way face.

For this midway face, I used inverse warping of all pixels in each triangle (obtained with the polygon function) and interpolated using RectBivariateSpline.

The midway image had a cross dissolve fraction and warp fraction of 0.5.

Original image of me Midway image Original image of Katie

Morph Sequence

Completing the full morph sequence followed a similar method to the midway point set computation. The major difference was that instead of taking 50% of the first image point set values for the average shape/color, we take a different amount for each step of the morph sequence.

Computation Steps

1) Warp the two images to a shape based on a parameter warp_frac. I used a range of [0,1] with 0.1 increments. This warp fraction determines the weight of the image points of the two image point sets when computing the average shape.

2) Cross dissolve using a parameter dissolve_frac. I used a range of [0,1] with 0.1 increments for this frac. This dissolve fraction determines the weight of the image points of the two image point sets when computing the colors in the morphed image result.

By combining all these different images into a gif, we can see a smooth morph sequence between two images.

Below are some of the intermediate results.

Warp & Dissolve = 0.2 Warp & Dissolve = 0.4 Warp & Dissolve = 0.6 Warp & Dissolve = 0.8

Part 2: Mean Faces

"Mean Face" of a Population

To compute the mean face of a population, we need a dataset of faces that belong to this population.

I chose to use the Danes dataset of annotated faces and compute the average face shape for the male, smiling population within this dataset. Specifically, this was the average of all images that ended with "-2m.jpg" in the filename in the danes dataset.

Computation Steps:

1) To compute the average face shape, I took all the points from all images in the population subset and averaged them together. For this specific dataset, this involved parsing the .asf files, extracting the points from the .asf files, and computing the average over all the points.

2) Morph every image in the population subset to the average shape. See below for examples. This follows the same steps as the morph sequence between my face & Katie's face, except this is only a shape warp.

3) Compute the average face shape by averaging all the morphed images together.

For each image, make sure to add in all four corners as points in the point set. This allows our morph to contain the entire image.

Morphing original photos in dataset to average face shape

Original Morphed to average face shape
Final Mean Image (smiling male Danes population)
Me warped to average geometry Average face warped to mine

Caricatures

Caricatures can be created by extrapolating from the mean face. Specifically, you can apply the equation: caricature image shape = population mean face shape + alpha * (your image shape - population mean face shape) where alpha should be either negative or greater than one to generate a true extrapolation.

Using the smiling Danes male population mean generated above, I created a caricature of my face.

Alpha = -0.5 Alpha = 1.5

Bells & Whistles

Changing ethnicities

Using a similar process to how I morphed my face into the average smiling face, you can change the enthnicity of a person by morphing to a facial average of a person of a certain enthnicity.

Here I transformed one of the people from the Danes image collection to the average Japanese man.

Original male from Danes Average Japanese man
Morphing shape only Morphing color only Morphing both shape & color
Morphing shape only (frac = 1) Morphing color only (frac = 1)

I also transformed myself into an average image of recent winners of best actress (Brie Larson, Julianne Moore, Cate Blanchett, and Jennifer Lawrence).

Me Avg of winners of best actress
Morphing shape only Morphing color only Morphing both shape & color

Classmate morph

I combined my image with several other classmates to form a morph chain of classmates :)