Face does not attach to mask

Want to understand the training process better? Got tips for which model to use and when? This is the place for you


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for discussing tips and understanding the process involved with Training a Faceswap model.

If you have found a bug are having issues with the Training process not working, then you should post in the Training Support forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
rolnor
Posts: 78
Joined: Tue Feb 23, 2021 10:09 am
Has thanked: 2 times
Been thanked: 4 times

Face does not attach to mask

Post by rolnor »

When I do convert the new face does not attach or "glue" to the head. The head is bigger then the new face and this looks no good. The new face is ok considering only 80000iter. I am doing something wrong, what? I use the extended mask and have tried learn mask but it does not improve.

User avatar
rolnor
Posts: 78
Joined: Tue Feb 23, 2021 10:09 am
Has thanked: 2 times
Been thanked: 4 times

Re: Face dies not attach to mask

Post by rolnor »

Here is a image.
Sorry for the poor quality

IMG_1080C.png
IMG_1080C.png (73.21 KiB) Viewed 12859 times

The headface is much larger and wider so a grey border is formed between the swapped face and the head

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Face dies not attach to mask

Post by torzdf »

So my suspicion on this one is that person A has a wider face than person B. As the mask is generated from person A data, the B face is not able to fill all the space in the mask.

The only real fix to this is to erode the mask (in convert settings) so that the face does fit inside the mask.

Ultimately, the gray area is where person A's face existed before. It is not possible to "generate background" for that area, as background does not exist there in the original frame, it is the person A's face. You can only fix this with either VFX or shrinking the mask in convert.

My word is final

User avatar
rolnor
Posts: 78
Joined: Tue Feb 23, 2021 10:09 am
Has thanked: 2 times
Been thanked: 4 times

Re: Face dies not attach to mask

Post by rolnor »

Thanks, I think you are right. Person B is a small guy and person A is 98kg. How do I shrink the mask? Is there a guide for this? Actually I could also solve this by losing 20kg weight, at least to some degree.

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Face dies not attach to mask

Post by torzdf »

You can do this with the Preview tool:

viewtopic.php?f=7&t=1083#Preview-Tool

My word is final

User avatar
rolnor
Posts: 78
Joined: Tue Feb 23, 2021 10:09 am
Has thanked: 2 times
Been thanked: 4 times

Re: Face does not attach to mask

Post by rolnor »

Is it the scaling-parameter that should be used? I have tried the prewiev tool but not very much good has come out from that. I have a very similar training on another pc and in this case (same person A and B) there is much less problem with the size of the heads. I can see that in the first case the head of person A is larger on the training prewiev images then in the latter case where there is much less problem.

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Face does not attach to mask

Post by torzdf »

No, it's the mask blending. It's all explained in there. I'm not going to repeat the information in the guide. If you have specific issues, then raise them.

Ultimately the preview tool shows you how it will output the final swap.

My word is final

User avatar
rolnor
Posts: 78
Joined: Tue Feb 23, 2021 10:09 am
Has thanked: 2 times
Been thanked: 4 times

Re: Face does not attach to mask

Post by rolnor »

Thanks, I will try maskblending again. I can see now that this problem occurs when I extract from a clip with close-up images, with a clip of the same person that is filmed from distance and extracted the problem is minor.

User avatar
vapovid
Posts: 1
Joined: Tue Sep 21, 2021 5:53 am

Re: Face does not attach to mask

Post by vapovid »

I think you are right. Person B is a small guy and person A is 98kg. How do I shrink the mask?

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Face does not attach to mask

Post by torzdf »

vapovid wrote: Tue Sep 21, 2021 11:40 am

I think you are right. Person B is a small guy and person A is 98kg. How do I shrink the mask?

Use the preview tool. This is covered in the guides.

My word is final

Locked