Face Morphing

A CS 194-26 project 3 by Xiangtian Li cs194-26-agr

Part1: Defining Correspondences

I use plt.ginput to select some key points of correspondences. The points is shown below.

correspond

Then I use Delaunay to get a triangulation for these points. The results are shown below.

george_tri lxt_tri
George's tri My tri

Part2: Computing the "Mid-way Face"

First we use the following formula to compute the affine matrix

1

then we get the affine matrix

2

We compute its inverse transform matrix and warp the two original images into mid shape. Below are the two original images and the mid-way face.

george lxt mid_way
George My face Mid-way face

Part3: The Morph Sequence

In order to get a sequence with 46 frames, I equally divide [0,1] into 46 parts and get 46 weights. For shape interpolation, New_img = img1*weight+img2*(1-weight). And cross dissolve shares the same weights as the shape interpolation. We get two example sequences below.

lxtgeorge suwu
me_george su_wu

Part4: The "Mean face" of a Population

We use the Danes dataset to compute the mean face. Below we give three example individual mean faces we computed.

01-1m 16-1m 30-2f
average1 average2 average3

This is the Danes mean face

average

And I also warp my face into Dances' and Dances' into mine

warp_lxt warp_danes
My face to Danes Danes' face to me

 

Part5: Caricatures

In this part, we select t as -1,0,1, and get the three images which are really interesting.

caricature_-1 caricature_0 caricature_1
t=-1 t=0 t=1

Also , we make a caricature gif to show something more funny.

caricatures

Bells and Whistles

Change "Gender" of Face

We use a female average face below

model

Then we try to apply only the shape into my face, only the color into my face and both into my face.

lxt only_shape only_color shape_color
Original face Only shape changed Only color changed Both changed

Harry Potter poster

We find a spoof version of Harry Potter movie poster and an original poster. Then we try to do some local change of the poster.

hp1 hp2 hp

Make a Produce a face-morphing music video of the students in the class

I make a gif of the transition between me and the next student.

My face The next student The transition between us

The full music video is shown below:

Shoud out to Zixian Zang for organizing this video!

Make a morphing music video on a theme

We make a music video on a pianist theme. We select 7 great pianists to make the video.