Skip to content

Explicit Image Detection:

Algorithm Name: image_explicit

Old Name: detect_safe_search

This algorithm is for detecting inappropriate images, including violence, adult, medical, racy and spoof.

Input: an image file

Output: a dictionary of results if the image is explicit.

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/image_explicit')
with open("LOCAL_PATH_TO_IMAGE", "rb") as img:
    response = algo.pipe(img.read())

Or use local file path directly:

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/image_explicit')
response = algo.pipe("LOCAL_PATH_TO_IMAGE")

For cloud storage users, please specify the file path in the cloud:

import Aiii
c = Aiii.Client("YOUR_API_KEY")

algo = c.algo('algo://adamleo/image_explicit')
response = algo.pipe("data://CLOUD_PATH_TO_IMAGE")