I used get_points() method modified from Project2's provided code to hand annotate corresponding keypoints. And then I used imported Delaunay method from scipy.spatial to calculate the triangles.
I averaged the annotated points for a middle face point structure and found its triangulation. I warped both my and George's face into the middle face to creat the two morphed faces as seen from above. Then I averaged the color of the two morphed faces to create the final result.
Using the morph function I wrote, I set wrap_frac and dissolve_frac to both be a evenly spaced sequence of length 45 between 0,1. Creating a gif with 45 frames, then I added a loop effect.
I use data from the FEI Face Database, selecting only the first 50 images of female to avoid the final average face to be too blurry.
The keypoints of each face is provided by the website, which we could observe is not very precise.
Some examples of morphing each of the faces in the dataset into the average shape.
I calculated the mean face by finding the mean point structure of all images and morph all image into the mean strcture. Then averaage the color to get the final blurry mean image. The above also shows my face warped into the average geometry and vice versa.
To do the caricature, I calculated the mean face of male and female of the FEI dataset. Then, using a much larger wrap_frac compare to part 2, I made two caricatures, one of me and female traits and another of me and male traits. We could see that the female trait caricature makes my face features to be compressed to the middle, indicating that my facial feature is too spread out compare to the mean face of FEI female. The male trait caricature does not compress my facial feature, but elogated my face horizontally, indicating that my face is narrower than the mean face of FEI male.
I used PCA method imported from sklearn.decomposition to do PCA analysis on my face space. we could see that some of the features are identified as most prominent in the face space, like hairlines, eyebrows, etc..
Using the PCA basis, we could augment a face using different features. For example, we could create a face with extra sharp eyebrows as shown above. This is a different way of transformation and morphing compare to the triangular mesh one used in project, but it has a lot of potential to do transformation too.
From this project, we could see that morphing using triangular mesh is very strong, picking the correct alignment would make morphing almost perfect as seen in the morphing sequence.