bakwc / PornDetector

Porn images detector with python, tensorflow, scikit-learn and opencv.
333 stars 66 forks source link

General use. #3

Open Rich700000000000 opened 8 years ago

Rich700000000000 commented 8 years ago

I was about to train this, when I had an Idea: Since I provide all the data for this, couldn't I technically use this to detect anything in an image? Like guns, or cars?

I'm not trying to be a prude and attack your hard work, I was just wondering.

bakwc commented 8 years ago

You can try. The first classifier, based on key-points is ok. But not shoure about the second one - color histogram may be not very usefull to detect guns or cars.

Rich700000000000 commented 8 years ago

color histogram

Hmm.. Ok, what about indoor/outdoor? That seems really color/lighting based.

bakwc commented 8 years ago

indoor/outdoor

That can be good for color/lighting based classifier, but not sure about key-points one :) You should try - why not.

bakwc commented 8 years ago

I want to try deep neural network with convolution laywers - may be it can provide a better quality. But not sure if it's possible to train on a small dataset.

Rich700000000000 commented 8 years ago

You can train on a small dataset, You just have to use more of the image.

bakwc commented 8 years ago

I tried tensorflow convolution neural network, it gave even better quality. I checked again, current detector provide only 84% quality, and I was able to achieve 89% with tensorflow. I will upload soon.

Rich700000000000 commented 8 years ago

Hey what about different kinds of porn? Straight/Gay?

bakwc commented 8 years ago

I don't have training data for that. If you have one - I can check.

Rich700000000000 commented 8 years ago

Not to be crude, but that should be really, really easy to gather, shouldn't it?

Here: https://github.com/Rich700000000000/Fourchan-All-Images-Archiver

bakwc commented 8 years ago

Added neural-network detector (nnpcr.py).

Rietaros commented 7 years ago

I have tried your model.bin and nnmodel.bin for porn image and I don't know which one is predicted as porn or not-porn. What the meaning of 0 and 1?

Is it 0 for porn and 1 for not-porn?

Thank you

bakwc commented 7 years ago

1 - porn, 0 - not-porn

Rietaros commented 7 years ago

Can I know what kind of picture that you used for training the not-porn class?

bakwc commented 7 years ago

Some random categories from flickr.

iDXM commented 6 years ago

I'm fresh in CNN. I can't understand your "readme" about how to use your model to test a image on tensorflow, can you give me more details about this? thank you very much! I just run the code below. from nnpcr import NNPCR model = NNPCR() model.loadModel('nnmodel.bin') predictions = model.predict(['image1.jpg', 'image2.jpg', 'image3.jpg']) print predictions And I get this report after running it. ImportError: No module named nnpcr