For this project I created morph animations for morphing one face into another and computed means for populations of faces.
The general approach for face morphing is to first define correspondence points on the 2 faces to morph, which defines the shapes of the faces. Then Delaunay triangle meshes are computed for each face shape. From there, an intermediary midway shape of the 2 faces is computed, which may take the shape of one face more than the other depending on the value of a warp fraction. After that we compute affine transformations for transforming triangles from the first face mesh into corresponding triangles in the intermediary midway face mesh, and similarly for transforming the triangles in the second face mesh to corresponding triangles in the intermediary midway face mesh. This morphs the shape of the 2 faces into that of the midway face. Finally color is balanced between the 2 shape-morphed faces by cross-dissolving with a dissolve fraction.
This morph procedure is repeated multiple times using the same 2 faces with varying warp and dissolve fractions in the range [0, 1] to create an animation of the entire morph sequence from one face to another.
Using plt.ginput, I defined correspondence points on my face and my friends face. The midway face is generated using the morph procedure described above for 1 frame with a warp and dissolve fraction of 0.5. The morph sequence is generated as described above, using dissolve and warp fractions that start at 0 and increment by 1/45 per frame.
|
|
|
|
|
|
I chose to compute the mean face of the expressionless male faces in Danes' dataset. To do so, I first computed the average face shape of the population by averaging the correspondence points of each face in the population. Then I morphed each face in the population into that average face shape using the face morphing procedure described in the overview, except the cross-dissolve step is skipped, meaning the resulting image for each frame is simply the first image morphed into the intermediary mid-way face shape. From there, the mean face can be found by averaging all the faces in the population that have been morphed into the average face shape.
Examples of faces morphed into the average face shape:
|
|
|
|
|
Some more faces (no morph sequence):
Note that the forehead and neck area of some of these shape-morphed faces look very deformed. This is because there are no correspondence points defined in the forehead/hair/neck area of the faces in Danes' dataset, since the points are defined as shown below (image taken from Danes pdf):
Here is the computed mean image of the population.
Here are morph sequences for morphing my face into the average face geometry, and vice versa.
|
|
Notice how the forehead disappears when morphing from the average face to my face's geometry, and how the forehead stretches strangely when morphing from my face to the average face's geometry due to the lack of correspondence points in those areas for Danes' dataset images. I tried to fix this by defining my own correspondence points (similar to the ones from first part of this project) on my face and the average face.
|
|
|
|
To compute a caricature of my face, I calculated the deviation between my face's correspondence points and the Danes male population average face's correspondence points. Then I extrapolated from the mean by adding scaling factor * deviation to my face's correspondence points to obtain the caricature face shape. From there I morphed my face into the geometry of the caricature face shape.
|
|
|
For bells and whistles, I decided to change the gender of my face. I defined correspondence points on my face and on an average chinese female face image I found online. Then, using the morphing procedure described in the overview section of this writeup, I morphed both the shape and appearance of my face into the average face. Then, I morphed the shape of my face to the shape of the average han chinese female face with the same procedure, except with no cross-dissolving. Morphing the appearance involves only doing cross-dissolve, without changing the shape of my face.
|
|
|
|
|
|
|