Giter Club home page Giter Club logo

Comments (12)

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024 2

@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.

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024 1

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.

danielbicho avatar danielbicho commented on May 25, 2024

Hey @TechnikEmpire can you give a brief description of your desktop specs? thx!

from open_nsfw.

danielbicho avatar danielbicho commented on May 25, 2024

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.

GuiFri avatar GuiFri commented on May 25, 2024

@TechnikEmpire, are all caffe models fastervia OpenCV's DNN module?

from open_nsfw.

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024

@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.

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024

@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.

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024

@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.

GuiFri avatar GuiFri commented on May 25, 2024

@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.

wangsijie avatar wangsijie commented on May 25, 2024

@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.

TechnikEmpire avatar TechnikEmpire commented on May 25, 2024

@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.

yunhai0920 avatar yunhai0920 commented on May 25, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.