Name: Tzu-Chuan Lin
I chose to use OpenCV to implement the annotation process because ginput
does not support opening two images simultaneously.
The key points:
Image A | Image B |
---|---|
The triangulation result:
Image A | Image B |
---|---|
Image A | Mid-way face | Image B |
---|---|---|
The result!!!
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 cropping | After cropping |
---|---|
And once I got this dataset, I first checked its order of the key points:
Image | Image with key points |
---|---|
Original | Morphed to the mean shape |
---|---|
Mean shape | Mean shape w order | Mean face | Mean face w markers |
---|---|---|---|
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 face | My face with markers |
---|---|
My face in average shape | The average face in my shape |
---|---|
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.0 | alpha=1.5 | alpha=1 | alpha=0.5 |
---|---|---|---|
Observations:
alpha=2.0
's eyebrows become even darker.alpha=2.0
has wider eye distance.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 ) |
---|---|
out = my_face + alpha * (tface - wface)
alpha=0 | alpha=0.3 | alpha=0.6 | alpha=1.0 |
---|---|---|---|
out = my_shape + alpha * (tshape - wshape)
alpha=0 | alpha=0.3 | alpha=0.6 | alpha=1.0 |
---|---|---|---|
alpha=0 | alpha=0.3 | alpha=0.6 | alpha=1.0 |
---|---|---|---|
Observations:
getAffineTransform
by myself and warp the image without directly using OpenCV's warpAffine
.