CS194-26 Project 4: Face Morphing!

Clarence Lam (CS194-26-abh)

Correspondences and Computing the "Mid-Way Face"

In the spirit of the start of the NBA season, I decided to morph Klay Thompson with Stephen Curry. In order to morph the two together, I needed to define correspondence points that match the different features on the two faces together; for example, eyebrows, eyes, nose, mouth, and perimeter of the face. The labeling must be consistent, i.e. the correspondences in the two images must appear in the same order.

I also added the corners of the images as points in order to morph the whole image; in addition, I matched the edges of the neck and the shoulders for a better warp overall.

Next, we obtain the average face shape/geometry by simply averaging each feature between Klay and Steph. After computing a Delaunay triangulation from the average face geometry, we will use this triangulation for the whole morph process; it is important to use the same triangulation to warp each photo/frame.

The next major step is to compute affine transformations on the triangles to morph the faces into the average geometry. We calculate and apply the affine transform that maps the three corners of the triangle to the three corners of the same triangle in the morphed image, as defined by the aforementioned Delaunay triangulation. We do this for each pair of triangles, to warp each of the two photos to the average shape, and then cross-dissolve the two warped images.

Klay Original

Steph Original

Klay Points

Steph Points

Klay Warped to Average Shape

Steph Warped to Average Shape

Splash Brothers Midway Face

The Morph Sequence

The morph sequence was created at 30 fps from 45 mid-way faces with different warp fractions between 0 and 1 regarding the facial shape morph and the image color. Frame 0 is identical to original Klay and frame 45 is identical to original Steph. I then appended the reversed sequence so that it loops back and forth for a more aesthetic experience.

Breakin' and Settin' Records: Splash Brothers

The Mean Face of a Population

I used the Danes dataset and defined my population as Danish women in the dataset. To create the mean face of a population, I used the keypoints already annotated on the data and computed the average face shape of the Danish women population. Then we morphed each face to the average shape and averaged the appearance/color.

You may notice some distortion in images below. This is because the Danes dataset only contains annotations along the jaw, the nose, the eyes, and the eyebrows. Not all the faces are aligned vertically, and some areas are not annotated, namely the upper head and the neck, so morphing a face to the average shape causes distorted warps in those areas.

The Average Danish Woman

A Danish Man

A Danish Man Warped to Average Danish Woman Face Shape

The Average Danish Woman Warped to a Danish Man's Face Shape

Danish Woman

Danish Woman Warped to Average Danish Woman Face Shape

Danish Woman

Danish Woman Warped to Average Danish Woman Face Shape

Caricatures

I created caricatures of the Danish man with the average Danish woman computed above, extrapolating instead of just interpolating between alpha's (warp_frac) between 0 and 1; thereby accentuating or decreasing the 'man' features of the Danish man.

Caricature α = 1.5; 1.5 Danish Man - 0.5 Average Danish Woman

Original Danish Man

Caricature α = -0.5; -0.5 Danish Man + 1.5 Average Danish Woman