All Projects → bakwc → Porndetector

bakwc / Porndetector

Porn images detector with python, tensorflow, scikit-learn and opencv.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Porndetector

Computer Vision
Computer vision sabbatical study materials
Stars: ✭ 39 (-84.27%)
Mutual labels:  opencv, scikit-learn
Deeplearning cv notes
📓 deepleaning and cv notes.
Stars: ✭ 223 (-10.08%)
Mutual labels:  opencv, scikit-learn
Studybook
Study E-Book(ComputerVision DeepLearning MachineLearning Math NLP Python ReinforcementLearning)
Stars: ✭ 1,457 (+487.5%)
Mutual labels:  opencv, scikit-learn
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (+42.74%)
Mutual labels:  opencv, scikit-learn
Ds and ml projects
Data Science & Machine Learning projects and tutorials in python from beginner to advanced level.
Stars: ✭ 56 (-77.42%)
Mutual labels:  opencv, scikit-learn
Selfdrivingcar
A collection of all projects pertaining to different layers in the SDC software stack
Stars: ✭ 107 (-56.85%)
Mutual labels:  opencv, scikit-learn
Gesture Recognition
✋ Recognizing "Hand Gestures" using OpenCV and Python.
Stars: ✭ 136 (-45.16%)
Mutual labels:  opencv, scikit-learn
Svm mnist digit classification
MNIST digit classification with scikit-learn and Support Vector Machine (SVM) algorithm.
Stars: ✭ 226 (-8.87%)
Mutual labels:  scikit-learn
Video Stream Analytics
Stars: ✭ 240 (-3.23%)
Mutual labels:  opencv
Superpixels Revisited
Library containing 7 state-of-the-art superpixel algorithms with a total of 9 implementations used for evaluation purposes in [1] utilizing an extended version of the Berkeley Segmentation Benchmark.
Stars: ✭ 222 (-10.48%)
Mutual labels:  opencv
Jetson easy
🔩 Automatically script to setup and configure your NVIDIA Jetson [Nano, Xavier, TX2i, TX2, TX1, TK1] . This script run different modules to update, fix and patch the kernel, install ROS and other...
Stars: ✭ 219 (-11.69%)
Mutual labels:  opencv
Deeppicar
Deep Learning Autonomous Car based on Raspberry Pi, SunFounder PiCar-V Kit, TensorFlow, and Google's EdgeTPU Co-Processor
Stars: ✭ 242 (-2.42%)
Mutual labels:  opencv
Opencv
📷 Computer-Vision Demos
Stars: ✭ 244 (-1.61%)
Mutual labels:  opencv
Real time object detection and tracking
YOLOv2 and MobileNet_SSD detection algorithms used along with KCF object tracker
Stars: ✭ 241 (-2.82%)
Mutual labels:  opencv
Blindwatermark
Java 盲水印
Stars: ✭ 239 (-3.63%)
Mutual labels:  opencv
Thug Memes
Command line Thug Meme generator written in Python
Stars: ✭ 224 (-9.68%)
Mutual labels:  opencv
Igel
a delightful machine learning tool that allows you to train, test, and use models without writing code
Stars: ✭ 2,956 (+1091.94%)
Mutual labels:  scikit-learn
Caffe2 Ios
Caffe2 on iOS Real-time Demo. Test with Your Own Model and Photos.
Stars: ✭ 221 (-10.89%)
Mutual labels:  opencv
Eland
Python Client and Toolkit for DataFrames, Big Data, Machine Learning and ETL in Elasticsearch
Stars: ✭ 235 (-5.24%)
Mutual labels:  scikit-learn
Wasm Sudoku Solver
a WebAssembly-powered AR sudoku solver
Stars: ✭ 241 (-2.82%)
Mutual labels:  opencv

PornDetector

Two python porn images (nudity) detectors.

First one (pcr.py) use scikit-learn and opencv. I was able to get ~85% accuracy on markup with 1500 positive and 1500 negative samples. It use two machine-learned classifiers - one of them use HSV colors histogram, and another use SIFT descriptors.

Second one (nnpcr.py) uses tensorflow neural network. I was able to get ~90% accuracy on the same markup. It use 4 convolutional (3x3 filters) combined with max_pool (2x2) layers, one 1024 fully connected layer and a softmax classifier at the end.

Requirements of opencv & sklearn detector

  • python 2.7
  • scikit-learn 0.15
  • opencv 2.4 (build it from sources, cause it missing SIFT by default)

Requirements of tensorlflow detector

  • python 2.7
  • opencv 2.4 (you can take binary from repository)
  • latest tensorflow

This is my configuration, may be it can work with another library versions.

Usage of opencv & sklearn detector

  • Url prediction demo: ./pcr.py url http://example.com/img.jpg
  • Code usage:
from pcr import PCR
model = PCR()
model.loadModel('model.bin')
predictions = model.predict(['image1.jpg', 'image2.jpg', 'image3.jpg'])
print predictions

Usage of tensorlflow detector

  • Url prediction demo: ./nnpcr.py url http://example.com/img.jpg
  • Code usage:
from nnpcr import NNPCR
model = NNPCR()
model.loadModel('nnmodel.bin')
predictions = model.predict(['image1.jpg', 'image2.jpg', 'image3.jpg'])
print predictions

Train model

  • create directory 1 (with non-porn images), 2 (with porn images), cache (empty)
  • Run ./pcr.py train (to train opencv & sklearn) or ./nnpcr.py train (for tensorflow one).

After train finish you will see accuracy and you will get "model.bin" file with your trained model. Now you can use it to detect porn (see functions predictTest and predictUrl). I added a sample model (model.bin) - you can test it without training your own model, but I recomend you to gather some huge collection of images (eg, 50K) for best results.

License

Public domain (but it may use some patented algorithms, eg. SIFT - so you should check license of all used libraries).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].