deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
50.52k stars 13.06k forks source link

Handle better shapes for face replacement (Not just a rectangle) #8

Closed Clorr closed 6 years ago

Clorr commented 6 years ago

The rectangle gives an artificial look at the generated image, so it would be a nice feature to use a more soft shape.

This page shows a couple of interesting tricks like: landmarks detection, hull detection, seamless cloning....

(Note: If needed, landmarks are already handled in the aligner class)

deepfakes commented 6 years ago

I added a first draft in order to apply the generated faces warped with Dlib landmarks. It sometimes gives better results, but it can be improved...

Note: In order to use it, you will have to DL the landmarks file from Dlib http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

505546486

831982426

Clorr commented 6 years ago

See here: https://www.reddit.com/r/deepfakes/comments/7leh8c/opencv_seamlessclone_is_pure_magic/

Clorr commented 6 years ago

Closing this since we have a decent face merge with #30 and that the seamless clone is part of the face align script (#16)