Project 3 Face Morphing - Lizhi(Gary) Yang

Defining Correspondences

I used matplotlib's ginput function to define the points following the annotation rule of the Danes face dataset [1]:
annotation rule 
                                                               annotation rule
I marked my photo and the photo of George and here are the resulting triangles, note that in the warping only one triangle configuration will be used at a time:
triangle visualization 
                              Delaunay triangles

Computing the "Mid-way Face"

After computing the triangles and affine matrix I am able to get the mid-way face by setting warp_frac and dissolve_frac both to 0.5, below are first the original images and then the mid-way image:
orig me orig george_small
                                                                    me                                                                                                                                           George
mid-way
                                                          mid-way face

The Morph Sequence

To get the video I basically set warp_frac and dissolve_frac between the range of [0,1] divided equally by the number of frames to get the gradual mid-way images, and then use these frames to make a video. Click the image below to view the YouTube video:
Morph Sequence
Here is the link if the above fails: [https://youtu.be/Tc0wfB5GENM]

The "Mean face" of a population

Using the Danes dataset[1], the population mean is computed by averaging the points, warping the faces to the mean shape, and also taking the average of the colors. Here are the images, first the population mean, then my face warped into the average geometry, and finally the average face waped into my geometry:
mean image
                                                           population mean image
me to mean
                                                    my face warped into the average geometry
mean to me
                                                  the average face warped into my geometry

Caricatures: Extrapolating from the mean

Extrapolation is done using this formula: pts = im1_pts +alpha*(im1_pts-im2_pts), and then warping my face to this shape. Here are the caricatures for extrapolation coefficient equaling -1,-0.5,0.5,1 respectively:
-1   -0.5
                                                                                   -1                                                                                                                                                                        -0.5

0.5   1
                                                                                 0.5                                                                                                                                                                            1

Bells and Whistles

1. Marvel Morph Music Video

I created a Marvel morph music video with our favorite heros. Click the image below to view the YouTube video:
Marvel
Here is the link if the above fails: [https://youtu.be/vZWUkVBPwO0]

2. Me to female

I calculated the female population mean of the Danes dataset [1] and here I am as a female, with shape only, color only and both:
shape
                                                                             shape only
color
                                                                                 color only
both
                                                                                  both

3. Class morph

I organized a group of people and concatenated the videos we generated together, adding the background music. Click the image below to view the YouTube video:
Class morph
Here is the link if the above fails: [https://youtu.be/O3vouduLS3w]
I am the 13th face in the video. All participants names can be found in the video description.