[Feat]: Add the ability to invert batch generated masks.
Describe your use-case.
- a toggle button that invert mask
learn background or learn foreground
i don't know if Unmasked probability, Unmasked Weight can do invert learning
What would you like to see as a solution?
ImageOps.Invert(input_image)
Have you considered alternatives? List them here.
No response
I ran into needing this too as I'm trying to train the background. I'm going to try batch inverting via gimp or whatever to see if that'll work. I assume so.
Please keep in mind masking likely does not work like either of you think it does, there are many many misconceptions about it, its not a replacement for cropping. To quote one of the former devs: "I find masked training is best when you've got a piece that trains harder than everything else in the image and you're trying to balance it. Does that apply to you? T"
I would still be interested in having this. Say you captioned image "backgrounds" (not the people behavior and appearance in it, but the setting they are in, landscape etc). Then it would make sense to generate an "inverted" mask with rembg to make it pick up on those parts of the image much faster. I guess one could work out a batch-workflow using imagemagick -negate or something similar to get the same effect, but it would be so much easier and less error prone this way.