Open lolsatdanger opened 5 years ago
@lolsatdanger It is certainly possible and is relatively easy to get it running in-browser. This is certainly on my to-do list. Currently I am very stretched for time, but I will definitely add tensorflow js version of this when i get some time.
Awesome! I'm glad to hear that it is on your list. I was not familiar with tensorflow js, but looking up that github now, it seems great. I look forward to it when you have the time!
You might find my project to be helpful for providing a bit of the backbone: https://github.com/wingman-jr-addon/wingman_jr That one hooks image requests via filterResponseData, so it is Firefox only.
Or you might find the Purify.ai plugin to be a good starting base: https://github.com/purify-ai/geacc-crx
I think that a different use case for such a plugin would involve censoring only certain parts due to sensitivity and cultural norms - I don't think fetishes would have to be the only use case here.
Hello,
I had a go at this myself using wingman-jr and tfjs-converter. I was able to replace the original model with NudeNet's model but I couldn't convert the detector model because it seems to use layers that aren't supported by tfjs (resnet?). Both classifier models have similar performance on my machine.
Side question: Would a browser extension be capable of running using multithreading?
That exhausts my understanding of ML. Maybe a tfjs version of the detector needs training from scratch?
@nn12343456 I am currently working on a new version of the detector. I am planning to use https://github.com/faustomorales/retinanetjs as a starting point for the js version.
@nn12343456 Fascinating! Yes, I imagine you might run into layers not supported by TF.js. They are adding support for different layers relatively frequently, so definitely keep an eye on new versions. Regarding multi-threading, the answer is yes, but with some caveats. Generally speaking you use "web workers" to get processing in the background, and they act more similarly to processes with pipes than threads if you ask me. However, plugins using WebExtensions cannot use web workers (at least in the main background processing script), but might be able to in the content scripts. I'm curious - when you want do multithreading are you more looking at the GPU or CPU part of the workload? Perhaps @bedapudi6788 's approach using retinanetjs will already handle the threading concerns?
Im curious how did the project end ornhows going. There is no mention of brownser support afterwards, but the only use for NudeNet for me is to block stuff on brownsers
i have it working with tfjs in browser without issues. see issue #54 for discussion on the topic.
What is the possibility / feasibility of using this to create a browser extension? Namely being able to censor only certain things. Probably counter-intuitive to some, but this could have some applications for kinky people with a denial fetish, lol, such as only censoring one gender/parts.
I see something in the readme about in-browser detection, is that the same thing as this? Is that still a plan? Really unique work here and it'd be amazing.