Description of the image

CS280A Project 3: Face Morphing

Part 1. Defining Correspondences

In this part, I selected my own photo and a photo of my favourate actress, Liu Yifei. For kaypoint labeling, I used the correspondence toll from last year. To generate a smooth transition between two photos, I first compute the average of the correspondence key points (points_A and points_B), resulting in the intermidiate shape points_avg. Then, the triangulation to the average shape was done using Delaunay traiangulation via scipy.spatial module.

Description of the image
Figure :Triangulation applied to my own photo and Liu Yifei's photo.

Part 2. Computing the "Mid-way Face"

Before computing the whole morph sequence, the goal is to compute the mid-way face of the images I chose in the previous part. This involves:

  1. Affine transformation between triangles (computeAffine)
    I used a mathematical operation to solve for the affine matrix A that maps the source triangle points to the destination triangle points.
  2. Warping Individual Triangles (warp_triangle_function)
    This function applies the affine transformation to each triangle in the source image, warping them to the corresponding triangles in the destination image.
  3. Warp the Entire Image (warp_image_function)
    This function loops over all the triangles and warps each of them from the source position to the average position. The result is an image whose triangles are matched to the average shape.
  4. Computing the Mid-way Face (compute_mid_face)
    This function includes averaging keypoints, warping both images, and then averaging the pixel values.
Description of the image
Figure :Mid-way face

Part 3. The Morph Sequence

The morph sequence was created by generating 45 frames, adjusting both warp_frac and dissolve_frac. The sequence was then saved as GIF (interval = 10ms) to show the gradual transition from my face to another.

Description of the image
Figure : Morph sequence

Part 4. The "Mean face" of a population

This part involves two actions:1. Compute the average face shape of the whole population (I used Danes dataset). 2. Morph each of the faces in the dataset into the average shape.

Morph sequence GIF
Figure : Average face of Danes
Morph sequence GIF
Figure : Examples of original face warped to the average shape
Morph sequence GIF
Figure : Visulization of keypoints on average Danes face and marking of the same keypoints location on my face
Morph sequence GIF
Figure : Warped my face to average Danes face shape and Warped average Danes face to my face shape

Part 5. Caricatures: Extrapolating from the mean

This part includes a caricature of my face by extrapolating from the Danes population average face.

Description of the image
Figure : My morphed woozy face with warp_frac=1.5 and my morphed smirk face with warp_frac=-0.5

Bells and Whistles

1. Changing Age

Here, I found the average face of old(60-69 years old) chinese women from[1]. I picked some keypoints from both my photo and the average face, then morphed my face to the average face via only shape, only appearance and both. To be honest, I would be very glad if I could look like this when I turn 60!

[1] Porcheron, Aurélie, et al. "Facial contrast is a cross-cultural cue for perceiving age." Frontiers in Psychology 8 (2017): 1208.

Exaggerated face
Figure : Old version (60-69 years old) of Xintian

2. Making a morphing music video of my fluffy friends!

Here, I selected my fluffy friends~ From begining to the end, we have Dabai, Maimai, Walnut and Taro~

Exaggerated face
Figure : Fluffy friends with their mid-way images