GithubHelp home page GithubHelp logo

emiliantolo / pytorch_nsfw_model Goto Github PK

View Code? Open in Web Editor NEW
50.0 0.0 3.0 89.75 MB

Pytorch model for NSFW classification with usage example

Jupyter Notebook 100.00%
machine-learning-models resnet-50 nsfw-recognition pytorch

pytorch_nsfw_model's Introduction

PyTorch model for NSFW detection

Description

This constains a PyTorch model for NSFW images detection. It's based on a ResNet50 neural network trained on ~250k images (~40 gb of data)

The dataset contains images of the following categories:

  • porn - pornography images
  • hentai - hentai images and pornographic drawings
  • sexy - sexually explicit images, but not pornography
  • neutral - safe for work neutral images
  • drawings - safe for work drawings and anime

Usage example

The repository contains a Jupiter notebook with an example code for perfoming simple inference on images to make predictions. The directory images constains some sample images for running the example.

Prerequisites

Tested on Debian 9

matplotlib
numpy
pillow
pytorch
torchvision

Run

Enter a shell and type the following commands:

$ git clone https://github.com/emiliantolo/pytorch_nsfw_model.git
$ cd pytorch_nsfw_model
$ jupyter notebook Inference_example.ipynb

Output

The output will follow this line:

Recordit GIF

pytorch_nsfw_model's People

Contributors

emiliantolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorch_nsfw_model's Issues

Dataset

Can you share the dataset ?

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.