aria1th / sd-webui-nsfw-filter

immediate nsfw protection for your colab, based on nsfwjs(https://github.com/infinitered/nsfwjs)
20 stars 2 forks source link

algorithms of the filter might be too strict #4

Open sdwcn opened 1 year ago

sdwcn commented 1 year ago

image i had tried with a few checkpoints, as shown above. Not sure if it's possible to have a weight option in order to adjust filtering rules?

aria1th commented 1 year ago

Sure, I'll add some thresholds and options for filtering (maybe, within 9 hours)

sdwcn commented 1 year ago

Sure, I'll add some thresholds and options for filtering (maybe, within 9 hours)

how's it going?

aria1th commented 1 year ago

@sdwcn I tried some more setups, but seems like it has weird bias on white dress... The first plan was implementing labels to blur, but maybe it should have some very custom setups (such as thresholding by probability) Today, I'll release with some basic and custom setups, but I think model was roughly underfitted for border-images, resulting 'some' exposure to be censored

sdwcn commented 1 year ago

noted, I'd like give a try,

sdwcn commented 1 year ago

how shall I understand the diff between safe questionable & explicit?

levels_to_idx = {
        'safe': [1,3,4],
        'questionable': [1,3],
        'explicit': []
    }

according to tags in comments, ['drawings', 'hentai', 'neutral', 'porn', 'sexy'] does qustionable equals [hentai + porn]?

aria1th commented 1 year ago

Yes, safe = all (hentai porn sexy) questionable = hentai+porn explicit = none

sdwcn commented 1 year ago

switched to "questionable", it still bias on white dresses, it sounds good if a probablity setting is enabled. cheers

aria1th commented 1 year ago

@sdwcn I can offer the probability option but its hyperparameter may require tremendous amout of test 😭