Face morphing!
Roma Desai  CS194
Project 3
DEFINING
CORRESPONDENCES
To begin morphing
faces, we must first identify features or points where the two images match.
For this part, I wrote a function to take user input and store the locations of
the corresponding points. For a face, about 25 points gave a pretty good
result. Once I had the corresponding points, I computed the average of the two
sets of points and computed a Delaunay triangulation. Computing the triangulation
on the midway shape gives a much smoother result. A Delaunay triangulation is
especially useful because it gives us “nice” triangles which are not overly
skinny. If triangles are too skinny, they may span a longer portion of the
image which could lead to subpar results. Here is the triangulation displayed
on my two input images:
My friend Pallavi 
Me! 


COMPUTING
THE “MIDWAY FACE”
To begin morphing,
I first formed the average shape of my two image points. Then, I inverse warped
the average shape into the two before and after images. Finally, I averaged the
two warped images together to get the final result. To do the actual inverse
warping, I used an affine transformation to map each average shape triangle to
one of the image triangles. I used interpolation to ensure the transformation
would land on actual points in the images. The results are shown below:
Pallavi 
Me 
Pallame 



THE
MORPH SEQUENCE
This section was
putting together all the hard work from the section before! Instead of
computing only the midway face, I computed 45 inbetween frames that showed
the transition from one image to the other. Putting this together in a GIF, we
get the following results:
Pallame 
Ari + Broccoli 
My brother + My dog 



THE
“MEAN FACE” OF A POPULATION
For this section,
I used a database of Brazilian faces to find the “typical” Brazilian face
shape. I decided to only use 50 images out of the set of 200 due to the time my
laptop takes to run. The images were preannotated with corresponding points so
all I had to do was read in the points. Once I had all the points, I found the
average shape, warped each image to the average shape, and then averaged all
the images together.
Here are some
examples of faces warped into the average shape and the resulting mean face:
Face 0 
Face 1 
Face 2 



Mean Face 

I also tried to
warp my own face to the mean face and viceversa. The results are shown below.
When morphing the mean to my face, you can see that the mean face got smaller
since my face is also much smaller and narrower. When morphing my face to the
mean face, you can see that my face became much larger and more rectangular to
better match the mean face.
My Face 
Mean Face 


Mean face in My shape 
My Face in Mean shape 


CARICATURES:
EXTRAPOLATING FROM THE MEAN
For this part, I
extrapolated my own face from the mean by adding more of the features that
cause my face to differ from the mean. In general, caricatures are known for
emphasizing unique features of faces. My result is shown below. One of my key
features compared to the average face is that my face is narrower especially at
the lower half of my face. Since I am moving my face further away from the
mean, the resulting image caused my face to become even narrower.
Before 
Alpha = .5 


BELLS
AND WHISTLES
1. Roommates Morphing Video ft. our current favorite song @GEazy
Here, I made a video that morphed together all
of my housemates. I thought playing our current favorite song in the video was
fitting.
Check it out
below!
2.
Changing Ethnicity
For this part, I tried
to make myself into a Russian woman! As you can see, my face was made wider at
the bottom and a little longer to match the shape of the average Russian face.
Me 
Russian Woman 
Russian Roma 



3. Class Morphing!
Some of us in CS
194 got together and created a class morph video. Together, we created an
order, morphed each of our faces to the person’s after us and finally put all
the individual videos together accompanied with some cool tunes. Check it out
below!