Skip to content

Bisenet-FP - Improved weights for masker #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 28, 2022
Merged

Conversation

torzdf
Copy link
Collaborator

@torzdf torzdf commented Mar 28, 2022

The following pull-request allows for the use of custom trained weights for the Bisenet-FP Mask.

The dataset of 40k faces has been built from a wide variety of posed and in the wild images. These have been manually annotated over several months to handle:

  • many varieties of real obstructions
  • difficult/varied conditions + poses
  • glasses (mask out frames, keep lenses)
  • dark sunglasses (mask out frames + lenses)
  • multiple targets within a single extracted image.

This dataset will continue to be grown over time and will be used to create new and more improved maskers. Whilst this solution is by no means perfect, it is vastly improved over any existing masking solutions.

NB: This Pull Request does not include the actual weights file. This will be going to Patreons first for a timed exclusive, but the weights will eventually be made available for use in the main code.

Glasses + Sunglasses:

gls

Ignoring the non-target face:

fac

Multiple obstruction types:

obs

@torzdf torzdf marked this pull request as ready for review March 28, 2022 11:58
@torzdf torzdf merged commit 7f3e6bc into deepfakes:staging Mar 28, 2022
@torzdf torzdf deleted the fp-obs branch March 29, 2022 11:21
Repository owner deleted a comment from laggopontes Nov 23, 2022
@arushishot
Copy link

How would I apply this? I followed the directions on Patreon, but couldn't find the ".cache" folder after "mask" to extract the zipped file. Would I have to extract in the "pycache" folder?

And is it automatically applied in Faceswap or do I need to uploaded it or select an option for it? TIA!

@torzdf
Copy link
Collaborator Author

torzdf commented Apr 6, 2023

How would I apply this? I followed the directions on Patreon, but couldn't find the ".cache" folder after "mask" to extract the zipped file. Would I have to extract in the "pycache" folder?

And is it automatically applied in Faceswap or do I need to uploaded it or select an option for it? TIA!

No need to add anything to the .cache folder. Patreons got this mask well ahead of time as a perk for membership, but it has long been rolled into the main Faceswap branch. Probably best to delete any files you added to .cache, in case I have made any model updates since then (I honestly can't remember).

You can select the mask either in extract or the mask tool (bisenet-fp). You can configure how the mask works (what it masks) in Settings > Extract > Mask > Bisenet-FP.

You can select the bisenet-fp mask for training in Settings > Train > Loss > Mask Type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants