Face Morphing

Name: Tzu-Chuan Lin

Defining Correspondences

I chose to use OpenCV to implement the annotation process because ginput does not support opening two images simultaneously.

The key points:

Image AImage B

The triangulation result:

Image AImage B

Computing the "Mid-way Face"

Image AMid-way faceImage B

The Morph Sequence

The result!!!

The "Mean face" of a population

For this task, I choose this dataset and I choose only men and with neural expression as the subset of the population.

Because each image contains a large portion of background, I first crop each image into 350x240(hxw) (centered at the mean of the annotated key points) and then do the analysis. Here are some examples:

Before croppingAfter cropping

And once I got this dataset, I first checked its order of the key points:

ImageImage with key points

 

  1. Morph each of the faces in the dataset into the average shape.
OriginalMorphed to the mean shape
  1. Compute the average face of the population and display it.
Mean shapeMean shape w orderMean faceMean face w markers
    1. Your face warped into the average geometry, 2) the average face warped into your geometry.

By above, one can notice the order of key points is:

Cheek -> Eyes -> Eye brows -> Lips -> Nose

I also label my face in this way so that I can warp my face into the average shape(geometry) and the average face to my shape.

My faceMy face with markers
My face in average shapeThe average face in my shape

Caricatures: Extrapolating from the mean

In the previous section, I computed the average face over Danish men.

Therefore, in this section, I produce a caricature by extrapolating faces between my face and the average Danish men. using this formula: result = alpha * my_face + (1-alpha) * Danish_mean_face (both shape and appearance)

alpha=2.0alpha=1.5alpha=1alpha=0.5

Observations:

  1. The exaggerated faces have brighter skins because the image of me has a better illumination environment.
  2. My eyebrows are darker than the average face and alpha=2.0's eyebrows become even darker.
  3. It seems my eyes' distance is wider than the average face so alpha=2.0 has wider eye distance.

Bells and Whistles

I found the average faces on this website: https://pmsol3.wordpress.com/ (I found this in this news)

And I choose these two images to change my ethnicity.

Average Taiwan face (tface, tshape)Average American white male face (wface, wshape)
alpha=0alpha=0.3alpha=0.6alpha=1.0
alpha=0alpha=0.3alpha=0.6alpha=1.0
alpha=0alpha=0.3alpha=0.6alpha=1.0

Observations:

Conclusion

  1. In this project, I learned how to implement getAffineTransform by myself and warp the image without directly using OpenCV's warpAffine.
  2. I also learned how to manipulate my face by the average faces!
  3. This project and the recent lectures about morphing the face really change my view on faces. The next time I see a face I will be reminded this is a vector space!