Re-extraction after manual tool causes missing unet-dfl masks

Want to know about the Faceswap's Face Extraction process? Got tips, ideas or just want to learn about how it all works? Then 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 for Extracting and preparing face sets for training a model in Faceswap.

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

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

Locked
User avatar
Surrogator
Posts: 13
Joined: Sun Jul 14, 2019 11:39 pm
Has thanked: 2 times
Been thanked: 2 times

Re-extraction after manual tool causes missing unet-dfl masks

Post by Surrogator »

  1. I've extracted faces with a unet-dfl masker.

  2. I've sorted faced and removed false positives and some misaligned extractions.

  3. I've used the manual tool to find the missing faces and set alignments for them.

  4. I've deleted the original extracted faces and re-extracted the faces using the new alignments file.

  5. Upon converting the video, I get many errors like "Failed to convert image: 'vid_007383.png'. Reason: 'unet-dfl'"

How can I re-extract the faces including the unet-dfl mask for these new alignments?

by torzdf » Mon Jul 06, 2020 10:00 am

When you manually fix the mask, any generated masks are erased (they have to be, as the masks no longer correspond to the actual face).

It's not ideal, but you can regenerate masks with the "mask" tool. If you select the mask(s) you want, select "missing" then it will fill in the gaps.

Go to full post

User avatar
torzdf
Posts: 1848
Joined: Fri Jul 12, 2019 12:53 am
Answers: 136
Has thanked: 79 times
Been thanked: 373 times

Re: Re-extraction after manual tool causes missing unet-dfl masks

Post by torzdf »

When you manually fix the mask, any generated masks are erased (they have to be, as the masks no longer correspond to the actual face).

It's not ideal, but you can regenerate masks with the "mask" tool. If you select the mask(s) you want, select "missing" then it will fill in the gaps.

My word is final


User avatar
kellurian
Posts: 9
Joined: Fri Jul 12, 2019 5:15 am
Has thanked: 3 times
Been thanked: 1 time

Manual Tool issues

Post by kellurian »

When I extract a data set, I typically use vgg_obstructed. However, every time I try to do a manual edit of theses, invariably when I go to train I get the error that the mask I have been training on is not present . This even happens when I do a mask edit and use the vgg_obstructed mask view. Is it defaulting to components and extended, or should I just use those from now on? Is there a way to make sure that all of the masks and faces are saved to a vgg mask before saving the alignment file? or should I not worry about training on the new alignment file, only train on the original alignment and just use the new one(after manual alignments) for the convert?

09/27/2020 14:39:26 ERROR Caught exception in thread: '_training_0'
09/27/2020 14:39:26 ERROR At least one of your faces does not have the mask vgg-obstructed stored for it.
09/27/2020 14:39:26 ERROR You should run the Mask Tool to generate this mask for your faceset or select a different mask in the training configuration options.
09/27/2020 14:39:26 ERROR The face that caused this failure was [side: A, frame: combined_002186.png, index: 0]. The masks that exist for this face are: ['components', 'extended'].
09/27/2020 14:39:26 ERROR Be aware that there are probably more faces without this Mask Type


User avatar
bryanlyon
Site Admin
Posts: 695
Joined: Fri Jul 12, 2019 12:49 am
Answers: 42
Location: San Francisco
Has thanked: 3 times
Been thanked: 169 times
Contact:

Re: Manual Tool issues

Post by bryanlyon »

Chances are you are changing some faces/alignment and those masks are being reset since the face image has changed. Don't do combined edit alignments and masks in the same pass, do separate passes for each.


User avatar
kellurian
Posts: 9
Joined: Fri Jul 12, 2019 5:15 am
Has thanked: 3 times
Been thanked: 1 time

Re: Manual Tool issues

Post by kellurian »

Ok, well I tried that. Only did manual with the alignments, didn't touch the masks at all and still getting the same error. Could this be something with the vgg obstructed masks? like does the manual tool just erase all those masks when you start using alignment edits as some kind of default?


User avatar
torzdf
Posts: 1848
Joined: Fri Jul 12, 2019 12:53 am
Answers: 136
Has thanked: 79 times
Been thanked: 373 times

Re: Manual Tool issues

Post by torzdf »

The reason for this is simple, but slightly annoying.

When you edit landmarks, the mask for the face changes as well. This is fine for components + extended, as they are landmarks based, so they get auto-regenerated. The other masks are NN based, It's not possible to regenerate these masks on the fly as the GPU is being used for Face Alignment, so the corresponding masks are deleted on any edit.

Once you have finished manually editing the landmarks, use the mask tool to regenerate the missing masks for your newly corrected faces. You can then go in and edit them.

My word is final


Locked