Content Filtering

content_filtering(data, [api_key], [cloud])
Determines whether or not an image contains mature content.
Available for version 0.8 and later.

Current Version: 2

Arguments

data – refer to img format guide – required
[api_key] – String – optional – your indico API key
[cloud] – String – optional – your private cloud subdomain
[v or version] – Integer – optional (defaults to 2) – specify model version

Output

This function will return a number between 0 and 1. This number is a probability representing the likelihood that the analyzed image has offensive content. Values greater than 0.5 indicate that the image most likely contains offensive content, while values less than 0.5 indicate that the image probably does not contain offensive content.

# single output
0.9782025594088044

# batch output
[
    0.9782025594088044, 
    0.3782025594088044
]

Example

import indicoio
indicoio.config.api_key = 'YOUR_API_KEY'

# single example
indicoio.content_filtering("<IMAGE>")

# batch example
indicoio.content_filtering([
    "<IMAGE>",
    "<IMAGE>"
])