All Projects → yangbisheng2009 → Nsfw Resnet

yangbisheng2009 / Nsfw Resnet

🔥🔥NSFW implement in pytorch(色情图&性感图识别,本程序经过了线上大数据集测试,性能优异效果良好)🔥🔥

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nsfw Resnet

Iresnet
Improved Residual Networks (https://arxiv.org/pdf/2004.04989.pdf)
Stars: ✭ 163 (+14.79%)
Mutual labels:  image-classification, resnet, image-recognition
Basic cnns tensorflow2
A tensorflow2 implementation of some basic CNNs(MobileNetV1/V2/V3, EfficientNet, ResNeXt, InceptionV4, InceptionResNetV1/V2, SENet, SqueezeNet, DenseNet, ShuffleNetV2, ResNet).
Stars: ✭ 374 (+163.38%)
Mutual labels:  image-classification, resnet, image-recognition
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (+129.58%)
Mutual labels:  image-classification, image-recognition
Pytorch classification
利用pytorch实现图像分类的一个完整的代码,训练,预测,TTA,模型融合,模型部署,cnn提取特征,svm或者随机森林等进行分类,模型蒸馏,一个完整的代码
Stars: ✭ 395 (+178.17%)
Mutual labels:  image-classification, resnet
Dmsmsgrcg
A photo OCR project aims to output DMS messages contained in sign structure images.
Stars: ✭ 18 (-87.32%)
Mutual labels:  image-classification, image-recognition
Awesome Computer Vision Models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 278 (+95.77%)
Mutual labels:  image-classification, resnet
Flutter programs
Experiments with Mobile
Stars: ✭ 308 (+116.9%)
Mutual labels:  image-classification, image-recognition
Dogs vs cats
猫狗大战
Stars: ✭ 570 (+301.41%)
Mutual labels:  image-classification, resnet
PlayerDetection
Player detection and ball detection in football matches using image processing(opencv).
Stars: ✭ 50 (-64.79%)
Mutual labels:  image-classification, image-recognition
Rostensorflow
TensorFlow ImageNet demo using ROS sensor_msgs/Image
Stars: ✭ 59 (-58.45%)
Mutual labels:  image-classification, image-recognition
Channel Pruning
Channel Pruning for Accelerating Very Deep Neural Networks (ICCV'17)
Stars: ✭ 979 (+589.44%)
Mutual labels:  image-classification, image-recognition
Image classifier
CNN image classifier implemented in Keras Notebook 🖼️.
Stars: ✭ 139 (-2.11%)
Mutual labels:  image-classification, image-recognition
Pytorch Image Classification
Tutorials on how to implement a few key architectures for image classification using PyTorch and TorchVision.
Stars: ✭ 272 (+91.55%)
Mutual labels:  image-classification, resnet
Resnetcam Keras
Keras implementation of a ResNet-CAM model
Stars: ✭ 269 (+89.44%)
Mutual labels:  image-classification, resnet
Deep-Learning
It contains the coursework and the practice I have done while learning Deep Learning.🚀 👨‍💻💥 🚩🌈
Stars: ✭ 21 (-85.21%)
Mutual labels:  image-classification, image-recognition
Mmclassification
OpenMMLab Image Classification Toolbox and Benchmark
Stars: ✭ 532 (+274.65%)
Mutual labels:  image-classification, resnet
Bsconv
Reference implementation for Blueprint Separable Convolutions (CVPR 2020)
Stars: ✭ 84 (-40.85%)
Mutual labels:  image-classification, resnet
al-fk-self-supervision
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"
Stars: ✭ 28 (-80.28%)
Mutual labels:  image-classification, image-recognition
Reproducibilty-Challenge-ECANET
Unofficial Implementation of ECANets (CVPR 2020) for the Reproducibility Challenge 2020.
Stars: ✭ 27 (-80.99%)
Mutual labels:  image-classification, image-recognition
Deep learning projects
Stars: ✭ 28 (-80.28%)
Mutual labels:  image-classification, image-recognition

English | 中文版

NSFW

NSFW - not safe for work

Python 3.7 Pytorch 1.4.0 cuDNN 7.3.1 License CC BY-NC

Description

Trained on 600,000 labled pictures:

  • porn - pornography images
  • hentai - hentai images, but also includes pornographic drawings
  • sexy - sexually explicit images, but not pornography. Think nude photos, playboy, bikini, etc.
  • neutral - safe for work neutral images of everyday things and people
  • drawings - safe for work drawings (including anime)

Requeriments

pytorch 1.0+
If you want pytorch 0.4, please download V1 release.

Usage

#train
python train.py --model resnet101 --epochs 90 --batch-size 512 --checkpoint ./checkpoint --data-dir ./data

#test
python test_confusion_matrix.py

#predict
python predict --model resnet101 --checkpoint ./checkpoint/x

#if your machine has connected to the internet and you dosen't want to download the image to your disk
cat urls.txt | python predict_url.py

Training data source

Special thanks to the nsfw_data_scraper for the training data. If you're interested in a more detailed analysis of types of NSFW images, you could probably use this repo code with this data.
If you want make better result.Contact me.I can provide you the best training data.

Current status

Sexy and porn is a little similar.In my view,it does'nt matter.  

SEXY

   

NETURAL

Detail

I have tried various methods include some pretrained models like resnet/inceptionv3 and data augumentation and finetuing.

Here are some tips which make a greate effect to the final result:

  • Make batch size bigger.(the bigger the better since I make it 512 with my p40)
  • Use pretrained model.(you can use torchvision. pretrained model can help your model convergence more faster)
  • Lock some layer and finetune FC.(after train_init.py then lock some layer just finetune the FC)
  • Adjust learning rate.(make lr dynamic when training in order to get saddle point)
  • Select appropriate pretrained model.(I choose resnet101 since it receive better result than resnet50 or inceptionv3)

Thanks

Thanks for my wife FeiFei Li. She gave me lots of encouragement. And made the beautiful logo for NSFW preject.
Thanks for my workmate Kuai Li. He gave me lots of good suggestion.

Join us

If you have good points.Join us! You can attach me by:
[email protected]
https://twitter.com/yangbisheng2009

References

https://github.com/GantMan/nsfw_model

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