sfw

sfw / NudityDetectioni2v / 0.2.13

README.md

This algorithm detects nudity in pictures by using the Illustration Tagger algorithm to determine whether or not an image contains nudity..

Table of content

  1. Introduction
  2. Examples

Introduction

This algorithm uses a tag output vector from Illustration Tagger to weight the different tags according to how they coincide with nudity in images.

Inputs

We allow for two independent input formats; the first as a standard string input, and the second as a JSON object.

string formatted input

"image"

(required) image - Image can be an http://, https:// or data:// url link to an image file. The currently supported image types are .jpg and .png. As of 0.2.6, src can also be a String (base64 encoded image) e.g. "data:image/png;base64,iVBORw..."

json formatted Input

{
    "image": String
}

(required) image - Image can be an http://, https:// or data:// url link to an image file, or a String (base64 encoded image. The currently supported image types are .jpg and .png.


Output

  • JSON object containing values for "nude", "confidence" and if given a URL or data URI, returns the URL given.

Examples

Example 1.

  • Parameter 1: Safe image URL
"https://s3.amazonaws.com/www.isitnude.com/assets/images/sample/obama.jpg"

Output:

{
  "url": "https://s3.amazonaws.com/www.isitnude.com/assets/images/sample/obama.jpg",
  "confidence": 0.5169059189709979,
  "nude": false
}

Example 2.

  • Parameter 1: Nude image URL
"http://www.isitnude.com.s3-website-us-east-1.amazonaws.com/assets/images/sample/young-man-by-the-sea.jpg"

Output:

{  
   "url": "http://www.isitnude.com.s3-website-us-east-1.amazonaws.com/assets/images/sample/young-man-by-the-sea.jpg",  
   "confidence": 1,  
   "nude": true
}