Project 3 - Face Morphing
by Aditya Yadav
Overview:
- In the first part of this project I will show how I created a gif of me morphing into George Clooney.
- This involves defining correspondence points for both images, showing how to make a mid way frame, and finally
how to make all the frames for the gif.
- I will then show the mean face I found from the dataset of the Danes, specifically from the male Danes who were
smiling in their picture.
- I will show some of those Danes with their face morphed to the average shape, as well as my face morphed to the
average. I'll also show the average dane face morphed to my face shape.
- I will use the mean face I found from the Danes to create a caricature of me by morphing my face and extrapolating
from that mean
- I'll do the same with a different average face I found online of indian bollywood actors.
- Finally for the bells and whistles I will show how I changed the gender of my face to be more feminine.
Defining Correspondences:
- The first step in creating a morph between two images is to define pairs of corresponding points between the
two images.
- I did so and then calculated a delaunay triangulation for the correspondence points of one image and used the
same triangulation for the other image as well.
- The triangulations are shown below:
Computing the "Mid-way Face":
- I then computed the mid way face of the two above images.
- To do so I first computed the average shape of the two sets of correspondence points.
- Essentially for each pair of corresponding points (x1, y1) and (x2, y2), I calculated (x1 * 0.5 + x2 * 0.5, y1
* 0.5 + y2 * 0.5)
- Then I warped both faces into that shape by figuring out the transformation matrices for each triangle in each
image to the corresponding average triangle, and used them to do inverse warping, along with some interpolation
to fill in the holes.
- Finally I averaged the colors together of both created images after the previous step.
- The two images and their mid way image (shown in between) are shown below:
The Morph Sequence:
- Now for the actual morph sequence, which contains all the frames for the gif [not just the mid way frame], I
first defined the function morph()
- It can take in different values of warp_frac and dissolve_frac which control which frame we are on in the sequence
- I found the first frame by passing in 0 for both warp_frac and dissolve_frac, followed by passing in (1/44) then
(2/44), (3/44) ... 1, leading to a total of 45 frames
- I then combined all the frames into a gif, shown below:
The "Mean face" of a population:
- In this part I first calculated the mean face of the male smiling Danes from the Dane face dataset.
- To do so I first found the average face shape of the male smiling Danes.
- I then morphed all the male smiling Danes into that shape and averaged them together.
- Some of the morphs are shown below of male smiling Danes being morphed to their average shape.
- I also show the morph of an image of myself to the average male smiling Dane shape.
Dane 1:
Dane 2:
Dane 3:
Dane 4:
Aditya:
- The average male smiling dane face is shown below:
- My face warped to the average male smiling dane face geometry is shown below:
- The average male smiling dane face warped to my face geometry is shown below:
Caricatures: Extrapolating from the mean:
- I produced a caricature of my face by extrapolating from the population mean of the male smiling danes from before:
- I also produced a caricature of my face by extrapolating from the population mean I found of the average indian
bollywood actor [shown later]:
Bells and Whistles:
Change gender of your face:
- To figure out how to change the gender of my face, I first found two average images of the typical male bollywood
actor and typical female bollywood actress:
- My goal was to make the following face look more feminine:
- I calculated the vector of shape changes needed to go from the male correspondence points to the female correspondence
points.
- This was done by simply subtracting the male correspondence points from the female ones.
- I then created a new female face shape for me by adding that vector to my correspondence points, then warped
my face to that geometry.
- The female shape image of me is shown below:
-
Only Shape change
- You can see the nose gets thinner, eyebrows get raised a bit, and the jaw changes as well.
- I followed a similar logic from above to find the color vector changes from the average indian bollywood actor
to actress.
- I added the vector to my face and the result is below:
-
Only Appearance change
- You can see lipstick and other complexion changes.
- To put them both together, I morphed the average images into my female face shape, then found the color vector
difference and added it to my female face.
- It is shown below:
- To me this looks much more feminine. You can see lipstick and other features, along with the shape change.