silveredgold / beta-protection

A flexible and extensible Chrome extension for censoring NSFW images as you view them.
https://silveredgold.github.io/beta-protection/
GNU General Public License v3.0
55 stars 15 forks source link

Is there a way to censor/ more accurately censor thumbnails? #57

Closed guyr1347 closed 1 year ago

guyr1347 commented 1 year ago

Frequently when browsing NSFW sites, like rule34, the actual image, when opened up, is censored properly, but the thumbnail, when browsing, is very inaccurately censored.

silveredgold commented 1 year ago

In general, no, unfortunately. There's two problems here:

Performance

To keep Beta Protection from dragging your browsing to a crawl, we only censor images above a certain size threshold. If we reduce that threshold (or remove it), we will be censoring a lot more images per page which noticeably slows down the page load. In addition, a lot of the smaller images that Beta Protection would then censor wouldn't be thumbnails of actual content but stupid stuff like logos, button backgrounds, icons, and the like. Those are pretty much guaranteed to not need censoring, but there's no way for Beta Protection to know that so we have to skip them to not be frustratingly slow, which also results in skipping smaller thumbnails.

Model Detection

The NudeNet model that Beta Censoring (and Beta Safety before it) uses is far from well optimized. One of the things it struggles with is when images are either much smaller or much larger than the images it was trained on. As such, even when we do run very small images (such as would be in some thumbnails) through your censoring backend, the model will not be as reliable as it is for larger images. Sadly, this can't really be fixed without a new model, and I don't have either the time or expertise to train a new model that could potentially perform better.


Hopefully that answers why this happens, and while I'll always see if I can improve things, I suspect thumbnails will just be one of those annoyances that we have to live with.