faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

correct_colours acts strangely in mouth area

Open dribnet opened this issue 9 years ago • 3 comments

I've noticed that the correct_colours routine is misbehaving in the mouth area. Here's an example with Kanye West’s body and a replacement face image:

input_sized transformed

You will get this output, where the lips appear white:

out1

This shows just the transformed output by setting the output of get_face_mask() to all white:

out3

And here is what the faceswap looks like if the correct_color step is skipped:

out5


Here is a second example with Gwyneth Paltrow's body and a replacement face.

input_image transformed

The colour correction this time causes a crazy bloody mouth look:

final_image

Turning off colour correction fixes this:

out2


I might look into this more and be able to offer a pull request to tweak the correct_colours() routine to fix this, but wanted to go ahead and report the issue.

dribnet avatar Jul 01 '16 02:07 dribnet

Hi, @dribnet,

I face the same problem with you, have you work out any solution for this? Thank you!

puppet101 avatar Sep 29 '16 12:09 puppet101

I have not - my only solution so far has been to simply turn off color correction - but I would be still be interested if anyone had time to propose better color correction routine. One thought could be to make a new mask for the color routine to limit it to the boundary region between the two images.

dribnet avatar Sep 29 '16 20:09 dribnet

@dribnet hi Have you done pre-process with face picture? How do I make the skin tone and brightness of head picture and face picture similar?

wadewj521 avatar Sep 11 '18 09:09 wadewj521