picobyte / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
540 stars 64 forks source link

The Minimum Fraction for Tags slider? What kind of fraction is this? #22

Closed Thedougler closed 11 months ago

Thedougler commented 11 months ago

So maybe im being dense but its not clear what function the "Minimum Value for Tags: field does

picobyte commented 11 months ago

It's a valid question, and it's a minimum fraction for tags, it is not related to the value or weights.

In a batch interrogation, if you have 10 images and 3 images gave black hair as tag, above other thresholds, then setting this minimum fraction to 0.2 will retain black hair whereas a fraction of 0.33 won't (because 3 in 10 is 0.30 which is less than 0.33). Note that you can combine interrogations (checkbox) and then this minimum fraction will filter across all the interrogations of the images in your batch, The minimum fraction can also apply for a single image, with these combined interrogations; if you used 5 different kinds of interrogators, and two yielded brown hair that's a fraction of 0.4.

At least that's how this is supposed to work. In the future I may allow to give each interrogation, in combined interrogations a weight, and then this will make the fraction a bit more difficult to explain, though the principles should stay the same. Hope that makes sense.

Thedougler commented 11 months ago

Ahh so it's like a "Percent required for positive results"

picobyte commented 11 months ago

Yes, My rationale for adding this slider was: oftentimes people use this extension to train for particular features and have collected images with these features, that consequently are very common in their batch of images. This slider makes it easier to select exactly those features that are common in the set. I renamed the slider label, I hope that makes it more clear.