All Projects → sajithm → nsfw-v2

sajithm / nsfw-v2

Licence: AGPL-3.0 license
NSFW Image Detector with REST interface developed using Keras and Flask

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to nsfw-v2

Nsfwjs
NSFW detection on the client-side via TensorFlow.js
Stars: ✭ 5,223 (+19988.46%)
Mutual labels:  nsfw-recognition
nsfw api
Python REST API to detect images with adult content
Stars: ✭ 71 (+173.08%)
Mutual labels:  nsfw-recognition
nsfw-classification-tensorflow
NSFW classify model implemented with tensorflow.
Stars: ✭ 58 (+123.08%)
Mutual labels:  nsfw-recognition
XCloud
Official Code for Paper <XCloud: Design and Implementation of AI Cloud Platform with RESTful API Service> (arXiv1912.10344)
Stars: ✭ 58 (+123.08%)
Mutual labels:  nsfw-recognition
content-moderation-image-api
An NSFW Image Classification REST API for effortless Content Moderation built with Node.js, Tensorflow, and Parse Server
Stars: ✭ 50 (+92.31%)
Mutual labels:  nsfw-recognition

nsfw-v2

An NSFW detector serving responses over REST API developed using Keras (Tensorflow) and Flask in Python

Introduction

A SFW/NSFW detector developed using Keras. It uses 3 sets of 2 convolution layers followed by a MaxPool. This is followed by a fully connected layer and SoftMax at the end.

The prediction is provided over REST API using Flask.

Usage

curl -X POST -F image=@path_to_image.jpeg 'http://localhost:5000/predict'

Sample Response

{  
   "is_safe":true,
   "predictions":{  
      "nsfw-nude":0.0003361131530255079,
      "nsfw-risque":0.2868056893348694,
      "nsfw-sex":0.008736947551369667,
      "nsfw-violence":0.06439296156167984,
      "sfw":0.6397283673286438
   },
   "success":true
}

Dataset

The dataset is not included in the repository. It can be downloaded from here.

The test/train images were resized to fit in 0.3MP (640x480 or less). Data is split into 5 categories: SFW, NSFW-Nude, NSFW-Sex, NSFW-Risque and NSFW-Violence. Each category has 5500 images - 5000 under training and 500 under testing sets.

Binary model is included in the repo as a ZIP archive. It is strongly recommended that you train the network with a larger datase.

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