CS 194-26 Project 4

Face Morphing

Quinn Tran (abu)


Computing the Midway Face

We find the mid-way face between two distinct faces (Regina and I). Compute the weighted average coordinates for each respective correspondence point. Create two warps, one for each image, then take the weighted average of the warped images' pixel values. warp_frac = dissolve_frac = 0.5. We apply a Delaunay triangulation on the averaged coordinates, img1 points, and img2 points. To warp imgi to average coords, compute an affine transformation matrix for each corresponding triangle. Formulation of optimization problem: variables for source img: x1, y1, x2, y2, x3, y3 variables for target img: x4, y4, x5, y5, x6, y6 A = square matrix of variables for source img. The value of the variables are the coordinate values from the source img triangle. b = [x4, y4, x5, y5, x6, y6].T, x = [[x1, x2, x3], [y1, y2, y3]] # the transformation solved with least squares

Scene 1

regina, quinn, warp_frac=0.5, cross_dissolve_frac=0.5

The Morph Sequence

We compute weight averages (in terms of coordinates and pixel values) between two images. warp_frac = cross_dissolve_frac = np.linspace(0,1,45). Here, we create 45 frames of equally spaced weights. Having different hairstyles, especially with fringe, would involve more complex triangulation or a less smooth morph sequence.

Scene 1

Slow, Fast

The "Mean Face" of a Population

We compute the midway face across all women in the Danes dataset. We have correspondence points for each image. Find the mean coordinate for every matching correspondence point in the images. Warp each face into the average coordinates. Take the mean of the pixel values of these warped faces. We can see that my face was warped to look more angular.

Scene 1

Average Danish Female, My face warped to average danish female geometry, Average danish female's face warped to my geometry

Caricatures

Extrapolate from the mean image by taking the different between the mean image's correspondence points and my respective points. Multiply the difference by alpha, then add the difference back to the mean's points. I then warped my face to the extrapolated geometry. warped_frac=0.8

More Danish

alpha=1, alpha=1.5, alpha=3

Less Danish

alpha=-1, alpha=-1.5, alpha=-3

Bells and Whistles

I attempted to change my gender by morphing my face to the geometry and some of the coloring of the average French man, mainly for details like facial hair and more "rugged" skin. The side effect was I looked slightly more caucasian. warp_frac = cross_dissolve_frac = .6

Do you know a brother?

me, average french man, manlier me, frenchier and manlier me

I made a morphing music video on the theme Katy Perry and Katy Perry Imposters.

Reflection

This project helped me visualize projections a lot more clearly (literally). It was interesting to see how projections could be framed as optimization problems. I hope you enjoyed my warps and evidence of a Katy Perry conspiracy.