Project 3: Face Morphing

COMPSCI 194-26: Computational Photography & Computer Vision (Fall 2021)
Alina Dan

Defining Correspondences

I first created pairs of correspondence points between the two images I wanted to morph together. To actually pick the data points, I used Python's ginput() and saved those points to a file for later use. I then averaged these points to compute midway points to compute a Delaunay triangulation from:

​ ​
Winwin
Mark
​ ​
Winwin Triangulation on Midway Points
Mark Triangulation on Midway Points

Computing the "Mid-way Face"

In the previous section, I computed the midpoints of two picture's points. To get the "mid-way face", I warped both original pictures into the "mid-way face". This is done through iterating through each triangle defined by the triangulation and performing an affine transformation on each triangle. The results were like so:

​ ​
Winwin
Winwin Morphed to Average Shape
​ ​
Mark
Mark Morphed to Average Shape
​ ​
Mid-Way Face of Winwin and Mark

The Morph Sequence

Following the above logic, a morph sequence was created that depicts morphing from a picture A to a picture B. For this sequence, we need to consider a warp fraction and a dissolve fraction (both values between 0 and 1). The warp fraction relates to the weighted average of our correspondence points in our images. The dissolve fraction relates to the colors taken from each image after the blend. For this situation, I had the warp fraction and dissolve fraction be the same value for simplicity's sake.

​ ​
Morph Sequence from Winwin to Mark - 45 Frames

The "Mean Face" of a Population

With logic mentioned above, I computed the average Danish person's face with a dataset of different headshots of Danish people. This involved loading correspondence points and averaging them together to get the mid-way points to triangulate on. Following this, I warped every picture to that average shape. Here are a few examples:

​ ​
Dane 1
Morphed Dane 1
​ ​
Dane 2
Morphed Dane 2
​ ​
Dane 3
Morphed Dane 3

Averaging 30 morphed Dane photos together resulted in this average Dane face:

​ ​
Average Danish Face

Here is what Mark looks like morphed to the average Danish face and what the average Danish face looks like morphed to Mark:

​ ​
Mark
Mark to Average Dane
​ ​
Average Dane
Average Dane to Mark

Caricatures: Extrapolating from the Mean

With the correspondence points from the previous section, I extrapolated caricatures with different alpha values. This process relates to subtracting correspondence points of the image I'm creating a caricature of from the population mean, scaling that difference by alpha, then adding that to the original image I'm creating a caricature of. Then, I warp the original image into those newly-modified correspondence points. With an alpha value greater than 1, I created a hyperdane and with an alpha value less than 0, I created an antidane like so:

​ ​
Antidane (alpha = -4)
Hyperdane (alpha = 2)

Bells & Whistles: Change Age/Gender/Ethnicity/Smile/Etc

For my bells and whistles, I morphed the image of Mark and an image of the average French woman to see how it worked on changing someone's gender and ethnicity.

​ ​
Mark
Average French Woman
​ ​
Morphing Shape
Morphing Appearance
Morphing Shape & Appearance