wingman-jr-addon / model Goto Github PK
View Code? Open in Web Editor NEWThe model for filtering NSFW images backing the Wingman Jr. plugin: https://github.com/wingman-jr-addon/wingman_jr
License: Creative Commons Zero v1.0 Universal
The model for filtering NSFW images backing the Wingman Jr. plugin: https://github.com/wingman-jr-addon/wingman_jr
License: Creative Commons Zero v1.0 Universal
Hello! I am working on the project that blocks the obscense images from browser using an addon.
If i want to put another pre trained model and use the addon, what changes should I do?
I would be grateful if someone can address the query as soon as possible!
Thankyou!
Note some of these contain objectionable content:
Translations for relevant portions of failing cases even on "untrusted" level from anti-NSFW-detection
:
- Stitching blank images
In most cases, CNN has limitations on the size of the input picture, so when detecting the picture, it will generally be scaled to a 1:1 square picture first, and then the detection is performed. For such a picture preprocessing method, we can splice the original picture and a longer blank picture together to form a picture with an aspect ratio far greater than 1. Such a picture will deviate from the data distribution of the model training data set after being scaled to a square, so it can play a role in confrontation.
However, this approach can also be quickly repaired. For pictures whose aspect ratio deviates greatly from 1:1, we only need to divide the picture into multiple 1:1 pictures and then detect them separately.
For such a confrontation method, it can be seen from the diagram below that Baidu AI and Tencent AI may have completely different detection results due to different processing methods.
...
P.S. At present, Sina's algorithm has not made targeted improvements to this confrontation method. P.P.S. Splicing multiple pictures together can also counter the detection of algorithms, but since most platforms will greatly compress long pictures, there will be more serious quality loss, so it may be better to splice blank pictures. P.P.P.S. Such a confrontational idea should not be difficult to think of, but because the targeted processing method will increase the amount of calculation several times, this may be the reason why the platform has not been improved.
- Convert to gif image
A blank picture and a target picture are respectively used as two frames of the gif picture, the blank frame is set to a shorter duration, and the target picture is set to a longer duration. The effect of the gif image obtained in this way when clicked to view is very small from the normal image (the disadvantage is that the volume of the image is greatly increased).
Such a confrontation method is very easy to detect in theory. The algorithm only needs to analyze the gif frame by frame, analyze and calculate it frame by frame, and finally return the maximum probability.
However, the fact is that Baidu AI provides detection for gif pornographic images (the interface description: this request is used to identify the pornographic degree of GIF images. For non-gif interfaces, please use the image review combination interface. The interface will check every frame in the picture. Recognize and return the result with the highest pornographic value among all the detection results. Currently, three dimensions are supported: pornography, sexy, and normal.) Tencent AI does not support gif format pictures, and Sina Weibo has not improved this.
- Stripe & gif
According to a certain stripe interval, the horizontal pixel value of the picture is alternately set to 255/0.
Unless similar image augmentation methods are added in the training process, it is difficult for the algorithm to accurately determine the category of such images. But the problem with such countermeasures is that the look and feel of the picture will be affected to a certain extent. The wider the stripe width, the more difficult it is to be detected, but the worse the look and feel caused by the loss of information will be more serious. In order to alleviate this problem, it may be necessary to superimpose two striped pictures together to form a gif to make up for this defect.
When the stripe width is 1, the detection result of Tencent AI is normal; when the stripe width is 16, the detection result of Baidu AI is also normal.
After splicing two striped picture frames together to form a gif, although the look and feel is slightly improved, the stroboscopic flicker caused by the limitation of the gif frame rate will cause discomfort
Respected Sir
I have another query.
The logo/icon on the blocked image that is displayed with prediction is performed using which icon and could please forward me to the code in the repo to that.
From user Drago:
Recognition for naughty GIFs (probably a nightmare for every programmer) left space for improvement (e.g. visit link - public warning: link contains 18+ content so please only open if you're 18 years or older https://komisari.itch.io/heros-harem-guild)
Anime/cartoon cases are indeed just harder; personally I think this is likely due to fewer telltale issues at a small-scale local level due to e.g. smooth gradients/cel shading.
Hi!
Which model version/ release is based on EfficientNet? I wish to implement the efficient model for this plugin
May I please request you to address the above at the earliest!
Over on the Wingman Jr. repository someone asked:
Are there instructions for replacing the model with a different trained model? Something like open-sourcing the tools to generate the model but without the training content?
I requested that the model half of that get split to here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.