Page 1 of 1

Remove forhead and hairs from swapping area

Posted: Sun Dec 10, 2023 3:50 pm
by gulfbox

Hello,

I was testing this software in 2020 with realface model. The output was quite good (a bit blurry in same cases) but overall result was impressive.

In this year I was trying to repeat the whole process on a new hardware and with newer software version and compare results. I found out that the output is much worse. The face is much more sharpen and looks better but the area that was swap is bigger. The area contains chick (that is good) but it also contains forehead with hairs around the temples (that is horrible).

The hairs are extremely blurry and makes a lot of dark discoloration on forehead. Is it possible to narrow the swap area automatically? Or maybe I prepared the training set in wrong way?

I used:

  1. Estraction with plugin S3Fd with Fan aligner with default settings.
  2. Train with Realface model with 200k iteration, with default settings.
  3. Convert with avg-color with Extended mask type and opencv writer.

Any suggestion how can I prevent from swapping forehead and the hairs area?


Re: Remove forhead and hairs from swapping area

Posted: Tue Dec 12, 2023 11:23 am
by torzdf

There are discussions and possible resolutions around this

viewtopic.php?p=7181

Directional mask erosion was added to faceswap to help counter this. You'll need to use the preview tool to get it right.

Some more discussion around this:
viewtopic.php?p=7667