15 ms·
Chrome, Firefox extension that blocks NSFW images using TensorFlow JS
- nextaccountic 6y agoDoes the Tensorflow model run in JS? How fast is that? Would it be feasible to run the model in wasm or in the GPU?
- rlayton2 6y agoI can't speak for this specific model/extension, but "most" neural networks aren't that big at the end of the day, and you are just a few matrix dot products away from getting your classification (of course, I'm drastically simplifying). Its the training that takes forever, due to the fact all those numbers need tweaking. However one you have the model, classifying is pretty fast.
- imvetri 6y agoAre there tools to visualise trained model,?
- rlayton2 6y agoSomething like this: https://www.tensorflow.org/tensorboard https://www.tensorflow.org/tensorboard
- imvetri 6y agoSomething to visualise the models, the one in this link https://github.com/nsfw-filter/nsfw-filter/tree/master/dist/models https://github.com/nsfw-filter/nsfw-filter/tree/master/dist/...
- dc_count 6y agoUse netron to visualize model: https://lutzroeder.github.io/netron/?url=https://raw.githubusercontent.com/nsfw-filter/nsfw-filter/master/dist/models/model.json https://lutzroeder.github.io/netron/?url=https://raw.githubu...
- langitbiru 6y agoYes, tensorflow model can run on JS. I did that when developing a Deep Learning product, PredictSalary (https://predictsalary.com https://predictsalary.com). The problem is not the model, but the TensorflowJS library (using Node) is big (8MB) after webpack-ing it (even after using compressing flag). So I decided to move the inference to the server. It's fast but I didn't toy with GPU setting when running Tensorflow model on JS.
- rtz12 6y agoI just installed this, and my whole browser grinds to a halt when I load a page...
- navendu_p 6y agoThat should not happen! Could you tell us about the issue? https://github.com/nsfw-filter/nsfw-filter/issues https://github.com/nsfw-filter/nsfw-filter/issues
- navendu_p 6y agoSo we use MobileNet V2 model. It is relatively light weight and can run fast on the browser itself
- raister 6y agoMy kid would just turn off the extension and keep his business going... :'(
- Darmody 6y agoThis is not a parental control software. It's made for you to be able to browse the web without worrying about NSFW images.
- pjmlp 6y agoLuckily in Europe, that is hardly an issue as most countries are quite alright with their bodies and sexualities.
- saagarjha 6y agoI'm curious: how would you boss react to such an image appearing on your monitor? Is this considered "OK" in a European workplace?
- pjmlp 6y agoProbably it would have been forwarded by the boss to start with. We don't have issues with nudity on prime time, although explicit stuff tends to be shown after 11pm. In some countries sex shop contents are visible from the street, and you can buy some kinds of toys on the local supermarket. And to be honest there is hardly anything left to hide when being at the beach or some parks.
- Darmody 6y agoThat depends. If you're doing your work and something NSFW pops on your screen I doubt your boss will give a fuck. If you're spending your time watching NSFW stuff in your work time he'll probably be mad, not because of the NSFW stuff but because you're not doing your work.
- deleted 6y ago[deleted]
- Santosh83 6y agoAnyone know of a tool which can process videos (movies) and black/blur out nude scenes and make the film "family friendly"? The processing doesn't have to be realtime... Just to expand: there are many excellent films which are not "family friendly" only because of 1 or 2 nude scenes which aren't even germane to the overall plot in many cases. I often wished there was a tool or SaaS that could detect such scenes and cut or blur them out. Would save a lot of manual processing.
- simion314 6y agoWouldn't make sense to remove the entire scene? Doing the Japanese style pixalation/censorship won't help IMO when you watch some movie with your kid and people start moaning. If the movie includes sex and nudity it probably includes some similar adult language so a tool that works in real time that only is trained on porn will be probably terrible and a waste of time though some "entrepreneur" would probably try to sell you such a tool (I mean it is just gluing shit togheter like most tools this days)
- jasonlfunk 6y agoThere is a company that was trying to work in this space called VidAngel. https://www.vidangel.com/ https://www.vidangel.com/ I used to use them quite a lot and then they got sued by everyone and now I’m not sure what they are up too. It’s unclear if a company has the right to offer others content in a modified form - ie filtering out unacceptable content. My favorite thing is that they had a JarJar filter for the Star Wars prequels.
- sircastor 6y agoThey do on the fly skipping in streaming services. Rather than reselling modified content, they’re skipping time codes.
- jasonlfunk 6y agoThis must have been their pivot after getting sued. They used to rent filtered movies for $1.
- capableweb 6y agoIf you want to make videos family friendly, it's probably better to aim for removing violence than nudity, as one is clearly worse for the psych than the other. Expansion: how are nude scenes not family friendly? Not trying to start any flame wars here, just trying to understand how one or two scenes with nudity suddenly means the video is not family friendly? We all go through life seeing nudity, so should be fine. Violence however is something we both strive and should avoid as much as possible.
- skrause 6y ago> Expansion: how are nude scenes not family friendly? The answer is "American Prudery".
- pledg 6y agoSee also American TV where you can show pretty extreme violence but not swear.
- zodiakzz 6y agoGore-filled cartoons censoring/hiding the female nipple always gets me.
- wlesieutre 6y agoOn that note, did you see this? https://www.indy100.com/article/instagram-is-flummoxed-by-mens-nipples-photoshopped-on-to-womens-bodies--b1sp7KtYzl https://www.indy100.com/article/instagram-is-flummoxed-by-me...
- chance_state 6y agoNo, not really. Most people don't want to watch graphic sex scenes with their parents. It's not a "muh America" issue.
- konart 6y ago
- pledg 6y agoThis would be too late in my workplace, as they'd be logged that I downloaded the images. That I didn't see them in my browser would be irrelevant.
- capableweb 6y agoYeah, fixing that would require breaking "The extension runs completely on your browser. i.e No user data is being sent to a server for processing." as image requests would have to be hashed, checked on a server and only allowed depending on the response. So seems this extension is not really for your use case but for others.
- gvjddbnvdrbv 6y agoI'm curious how workplaces do this. Does they have a root cert installed so they can MITM SSL traffic?
- pledg 6y agoBasically yes.
- amelius 6y agoYou could still run your own layer of encryption through that pipe though.
- gvjddbnvdrbv 6y agoPresumably that is against policy and would get you fired?
- dec0dedab0de 6y agoEvery place I ever worked did exactly this. They use a protocol called WCCP which is essentially source routing, so if you're going to the internet on certain ports it routes you to a proxy server instead of whichever router it normally would. Most companies big enough to do this already have their own internal CA installed on all the machines, for internal sites, so they use that same CA to sign the mitm cert. With so many sites using HSTS it can be annoying if you access a site while off the network. As far as them knowing the content of a particular image they would need to have some kind of machine learning like this extension.
- ndm000 6y agoShameless plug - I've been working on something similiar, but with a different aim. https://github.com/nmurray1984/porn-blocker-chrome-extension https://github.com/nmurray1984/porn-blocker-chrome-extension I found that the hardest problem to solve was the prevanlence of false positives. Even if you have a low false positive rate, it's still very likely to have an image blocked regularly just due to volume. For that reason, the focus of my plugin is - for users that are OK with it - contributing URLs that are not NSFW but have been blocked. The extension includes a right-click menu option to do so.
- antpls 6y agoAssuming you meant some SFW images are mistakenly blocked, it is an easier situation than with true negative. Once an image tested positive with your first model, you could run a second more CPU intensive model (but also more accurate) on it.
- wongarsu 6y agoAssuming you have a notably more accurate algorithm. It's a difficult problem even with infinite computing power.
- ndm000 6y agoGreat idea. MobileNetv2 is the model used currently due to it's small footprint (I used transfer learning on a dataset of NSFW and SFW images). A more robust model ran on all positives could improve performance overal.
- kmfrk 6y agoThis is great, except it'd be really, really great with some sort of placeholder image for the blocked images if possible.
- navendu_p 6y agoWe had that in the first version but we kind of removed it. We will try to add one option for that.
- aasasd 6y agoI happen to not be afraid of boobs, so ever since my days on Reddit I wish for blocking of random gore instead. This is weirdly pertinent sometimes on DDG's image search. Edit: to clarify, I'm not afraid of some killing either, thanks to the pop culture of the past seventy years or so. Now, why eye-hurting images of bodily damage pop up on rather innocent searches—that's a haunting mystery. On Reddit, the ‘NSFW’ label is used equally for a vaguely sexually suggestive shape or a close-up more suitable for a surgical journal. As if I didn't get plenty of suggestiveness just from music videos anyway! So my long-standing wish was for an ‘NSFL’ filter instead.
- iso947 6y agoFor some reason in America half a butt cheek is worthy of a 15+ rating in films, but “general release” films are fine with burnt bodies hanging from trees
- liability 6y agoAmerica doesn't have a '15+' rating, lots of 'PG' movies have butts in them, and what 'G' rated movie has burnt corpses hanging from trees??
- azalemeth 6y agoI have never understood how acts of love (at best) or reproduction (at the least) are considered in some societies to be dangerous, shocking, and in need of the strictest censorship -- or at the very least, not on prime-time TV. Yet acts of war, killing, maiming, and violence in general are often the mainstay of entertainment. Sex is part of human nature – and, I would argue, a much bigger and better part of it than violence and aggression. Why do we hide from it?
- Flimm 6y agoIf porn needs to be filtered then it needs to be filtered regardless of attitudes towards of depictions of violence, and if it doesn't, it doesn't. We shouldn't choose as a baseline depictions of violence. Many people say they are negatively affected by porn addiction (whether consumers, or partners of consumers, or parents, or people who feel objectified, even some people in the industry), and they feel strongly about it. Just because sex is a good part of human nature doesn't invalidate that in their eyes. In fact, it is precisely because some consider sex to be good and precious that they want to be much more careful about viewing it or depicting it, and I agree with that. The number of societies that don't want censored sexuality is near zero. It is not just "some societies". And there are plenty of societies that desire that more than western ones.
- zmix 6y agoI'd rather have every news about the Trumpeteer blocked.
- williesleg 6y agoBoring. I'd like the inverse, where only NSFW images are shown. Now THAT would be an extension!
- liability 6y ago> All the images remain hidden until they are found to be NSFW or not The demo screenshot/page seems to only show NSFW images, so the demo doesn't convey how quickly this classifier can operate. The demo page should have some non-NSFW images to show off how quickly SFW images are revealed, since the default is to block all images.
- navendu_p 6y agoWe will change that. Seems like a good idea
- m3kw9 6y agoFrom experience 99.9% of the time unless I visit a porn site purposely or some warez site by accident, or questionable reddit channels, I see no NSFW. However I do see some benefits if this was for kids.
- yonixw 6y agoSound like you have ad-block or avoid sketchy (pirate) websites.
- esperent 6y agoAdblock is a far simpler and probably more effective solution than this, with a host of other benefits such as speeding up websites, whereass presumably this extension will slow down the browsing experience quite a bit. Given that, the only reason I can see for using this is if adblock was not doing a good enough job alone.
- Wowfunhappy 6y agoPreventing the last 0.1% could be meaningful though, depending on your environment.
- codetrotter 6y agoA few years ago I was at work and was looking up something and the page I landed on had ads that featured a barely dressed lady in them. The funny thing is that I didn’t even notice the ad until one of my coworkers, who was passing by my desk stopped, chuckled and asked me if I was looking at ladies on the computer during working hours lol. I guess I had developed a kind of builtin ad filter into my brain, from ignoring so many ads over the years. Thankfully, my place of work had reasonable people working there. But I think if I worked somewhere more strict even that one ad might have prompted a conversation with HR. Nonetheless, I promptly installed an ad-blocker on the browser in case any ads would be shown in the future that would have been more explicit than the one that had been showing this time.
- refresher 6y agoI’ve jokingly / seriously been waiting for things like this. I’m the type to go overboard with filtering and mute lists on twitter, but images are harder to deal with. I did have a 60,000 line pastebin that was used in conjunction with a Chrome extension to block Wojack and Pepe memes on 4chan using md5 hashes, but something not rely on specific hashes is obviously superior. One day someone will release the ‘detect and block anything resembling kpop’ extension for Twitter and I’ll be happy.
- solarkraft 6y ago> block Wojack and Pepe memes on 4chan What are you there for, then?
- nabaraz 6y agoto collect dataset?
- euudheehdy 6y agoWait, I'm still confused. Why have a nsfw filter for data collection if the subject is partially defined by its nsfw qualities?
- qzx_pierri 6y agotouché
- justanotherhn 6y agoI expressed some interest at some point of hiding profiles which contained a certain phrase in their bio and got downvoted. Does anyone know of any extentions that can do this?
- justnotworthit 6y agoI'd love a youtube comment filter that instantly removes anyone with a meme avatar or famous world leader avatar. I can skip the opinions of Hitler, pepe and JC Denton.
- umvi 6y agoNow just make a version that whites-out NSFW text in e-books and market it to Utahns as a way to read PG-13 versions of Game of Thrones books and you'll be rich. However, you'll probably also be sued into oblivion by angry authors/publishers who don't like people modifying what they read in any way.
- KMnO4 6y agoI know that’s tongue in cheek, but I’d really appreciate having a NSFW text filter. Some of my CX team is getting harassed by trolls who send profane messages and racial slurs through the Zendesk Chat interface. Zendesk does not have a way to filter out profanity (for Chat at least; there are options for emails or tickets). I’ve found simple client side extensions that can censor words, but a better approach would use NLP to grasp the context. “I hope you die” contains the same words as “My <product> got wet, I hope it didn’t die”, but with vastly different intention.
- dexen 6y agoGoogle Jigsaw might have what you are looking for, under the "Harassment" headline [1]. Note however both Google (Alphabet, really) and the tool specifically, were accused of various forms of bias [2] by various sides of discourse. -- [1] https://jigsaw.google.com/issues/ https://jigsaw.google.com/issues/ [2] for example https://boingboing.net/2019/08/14/white-aligned-english.html https://boingboing.net/2019/08/14/white-aligned-english.html
- gftsantana 6y agoI've been wanting for something like this ever since we by accident looked at our 9 year old daughter's screen. She likes to draw characters from her favorite cartoon and searches for images on the web. Apparently there's a porn actress with the same name as one of the characters... DDG was set to "strict", so no full nudity or any explicit act, but still very NSFW.
- moooo99 6y agoDDG is kind of fascinating. Ever since I switched to DDG as my main search engine, I feel like the internet is 90% porn. Although that's probably not far off, I'd prefer seeing relevant search results instead.
- detaro 6y agoFar from that bad IMHO, but it has a weird tendency to surface NSFW results, yes.
- moooo99 6y agoIts not that bad with the regular search results. Sometimes porn makes it to the first result page, usually its on the second or later. The real problem is when searching for images. I recently had to search for a lot of images and for basically any search term I entered DDG was able to find porn. Ultimately, this made me switch back to Google since constantly having to risk showing NSFW results on your workplace in an open plan office isn't exactly a great experience. I'm now using Google at work, Ecosia on my mobile phone and DDG/Google on my PC/Mac.
- dwighttk 6y agoyeah, I think that is because Bing provides (some/a lot/all?) of their image results and Bing seems to have tried to maximize their porn results. Both of those ideas are heresay/rumor.
- solarkraft 6y agoWhy would I care about not seeing NSFW images? What I really do care about is not seeing worthless clickbait. That makes me endlessly angry. Could you build a filter like that on top of this?
- cheeze 6y agoUh, because I'm at work and wouldn't mind an additional layer of protection. Because I live stream and people try to trick me into viewing NSFW content on stream. Is this really a question?
- hackingthenews 6y agoThis (free) product is not something I need, so let me quickly make everyone aware of that. Also here is something else I would rather have that actually would demand a very different kind of effort.
- yetanothermonk 6y agoHey, Long here, I meant to keep this private for a while, but I’m building this thing. getpuritan dot com for now. My prototype is a chrome extension that blocks clickbait using a ML model that placed top 3 in a clickbait prediction competition, but it’s really rough. My email is longintuition at protonmail if you’d like to help me test—can also send a video so you can see how it works
- goto11 6y ago> Why would I care about not seeing NSFW images? The issue with NSFW images is not you seeing it on your own computer, it is other people seeing it on your computer (e.g. while walking by or for some other reason).
- zxcvbn4038 6y agoMissed opportunity - where is the browser extension that makes all of the images NSFW? You leave your laptop unlocked and suddenly it looks like the nude bomb went off (https://m.imdb.com/title/tt0081249/ https://m.imdb.com/title/tt0081249/).
- andrekorol 6y agoThis extension reminded me of that Black Mirror episode where a mother filtered what her daughter could see and hear. Great work with TensorFlow by the way, can't wait to see this technology maturing over the years.
- deleted 6y ago[deleted]
- bullman 6y agodisappointed this is not called "hotdog / not hotdog"
- amelius 6y agoI want this but for ads.
- e12e 6y agoI was qurious about the classifier, and as expected it appears to be based on crawling to get the unsafe images - I doubt it's quite in compliance with neither copyright or gdpr.. The classifier lib: https://github.com/alex000kim/nsfw_data_scraper https://github.com/alex000kim/nsfw_data_scraper Announcement points to this data source (while the readme hints at a "premium" classifier): https://github.com/infinitered/nsfwjs https://github.com/infinitered/nsfwjs
- olliej 6y agoHas anyone confirmed it isnt tagging non-pornographic images? Breastfeeding, breast exam tutorials, sand dunes, etc Has anyone tested to see if it correctly handles PoC? That demo site it points to almost exclusively light skinned folk. These are the basic things I’d want confirmation of.