Comments (12)
@danielbicho i7 6700 @ 3.4 ghz w/16gb ram.
Don't worry, I've trained a squeezenet model that has similar accuracy but is ~3x faster. Yahoo didn't open source their solver/training params trying to keep the secret sauce secret.
Relevant stuff here:
https://github.com/TechnikEmpire/NsfwNET
https://github.com/TechnikEmpire/NsfwSqueezenet
There's a pure C++ example in the NsfwNET repo as well so it's not just C#. It's just a C# wrapper around C++/openCV.
from open_nsfw.
Switch to using the model via OpenCV's DNN module, it's pretty quick. On my desktop I can classify at about 34 FPS.
from open_nsfw.
Hey @TechnikEmpire can you give a brief description of your desktop specs? thx!
from open_nsfw.
Impressive work @TechnikEmpire . I will definitly test your NsfwSequeezenet, but first i need to label my own dataset for validation. I have like Terabytes of images to classify so speed is important to be able to do it in a reasonable time frame!
Basically even if i use Yahoo model with OpenCV's DNN module i will get increased speed performance??
from open_nsfw.
@TechnikEmpire, are all caffe models fastervia OpenCV's DNN module?
from open_nsfw.
@danielbicho yes, the DNN module is several times faster it would appear than using python here. As you see above people report on average a whole second (life age of the universe in computer time) to get a single forward pass and returned result.
If you need to classify that much data though, do what I did. Get a half decent nvidia GPU, install Ubuntu 17+, install caffe-cuda and then use the c++ classifier example in the caffe repo to do your classification on the GPU. If you have TB of data you're going to want to do that or massively parallelize CPU classification, which will involve creating per-thread classifier instances because the network operations are not thread safe.
If I can offer any other help just drop me an email, contact info should be in my profile I think or just send to info @ my name .com.
from open_nsfw.
@GuiFri They are constantly updating a thorough benchmark table here:
https://github.com/opencv/opencv/wiki/DNN-Efficiency
For the work involved to get OpenCV DNN up and running with a CPU target, speed, and for the smallest binary size, cv::dnn is the best afaik.
from open_nsfw.
@danielbicho If you do go the GPU route then just use Yahoo's model here. It is a very good model, it's just expensive to run. I made my squeezenet model because I need to deploy something like this for mass market in consumer software so I'm ok with not having quite the same amount of coverage as Yahoo's excellent model.
from open_nsfw.
@TechnikEmpire Regarding GPU route, what do you expect it would be faster:
1- NsfwNET with dual Xeon E5-2667v4 8xCores 3,20 Ghz
2- open_nsfw with Ubuntu 17+ and caffe-cuda with an nvidia GTX1080 8G
from open_nsfw.
@TechnikEmpire I use your "nsfw_squeezenet.caffemodel" to classify 40 pictures and it takes 15s, but it just takes 6s using Yahoo's model provided in this repository.
PS. CPU mode, i7-7700k
from open_nsfw.
@wangsijie @GuiFri you guys should create tickets on my repo as I don't want to cause chatter on Yahoo's repo over my stuff. I'd be interested to know how you're executing these classifications @wangsijie as those stats are brutally bad. You're using CV::dnn for this?
from open_nsfw.
@TechnikEmpire hi, I use your "nsfw_squeezenet.caffemodel" &"deploy.prototxt" and Yahoo's classify_nsfw.py to classify 1picture,it takes 0.38s, but it takes 0.53s using Yahoo's model .
from open_nsfw.
Related Issues (20)
- python can't open classify_nsfw.py HOT 2
- Instructions to retrain the model with own image data set HOT 1
- there is a RuntimeError: Pickling of "caffe._caffe.Net" instances is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html) when I try run open_nsfw in multi-process HOT 4
- Some images marked as nsfw are wrong HOT 4
- Build error HOT 3
- cannot upload docker file HOT 2
- Segmentation fault when running classify_nsfw.py
- if or not we need to delete the weight_filter{} and bias_filter in the deploy.prototxt? HOT 3
- Docker Build failure: the url given returns 404 HOT 3
- Dataset production
- google.protobuf.internal : ModuleNotFoundError: No module named 'google'
- Give me some data for training :trollface:
- Python3 Support HOT 8
- My NSFW model
- Would anyone like to maintain this project? HOT 1
- Building docker image fails HOT 4
- ImportError: cannot import name main HOT 3
- not preloading model when started from node with child process HOT 1
- performance cpu vs gpu HOT 1
- Detached head during image building
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open_nsfw.