learnopencv icon indicating copy to clipboard operation
learnopencv copied to clipboard

How can I get image.jpg.txt file in the face swapping part, for my own image

Open BakingBrains opened this issue 2 years ago • 3 comments

BakingBrains avatar Oct 25 '21 04:10 BakingBrains

Can you provide more details and pointers about which sample and which problem you are talking about? What have you tried so far? Were you following a specific post, specific instructions?

brmarkus avatar Oct 26 '21 05:10 brmarkus

In https://github.com/spmallick/learnopencv/tree/master/FaceMorph, there are image.jpg.txt, how to generate this for our own images.

BakingBrains avatar Oct 26 '21 10:10 BakingBrains

There is a " blog post " mentioned, pointing to "https://learnopencv.com/face-morph-using-opencv-cpp-python/". In the section "1. Find Point Correspondences using Facial Feature Detection" the following is mentioned:

I used dlib to detect 68 corresponding points. Next, I added four more points ( one on the right hand side ear, one on the neck, and two on the shoulders ). Finally, I added the corners of the image and half way points between those corners as corresponding points as well.

This results in a list of 80 coordinates. use these 80 coordinates and write it into a file.

Following the mentioned blog also mentions another set of 149 points - which is expected by the sample-code in a file called "tri.txt".

brmarkus avatar Oct 27 '21 08:10 brmarkus