Explicit Content Detection Activity
The Explicit Content Detection activity identifies explicit content, such as adult or violent material, within an image. It analyzes the image across five categories: adult, spoof, medical, violence, and racy, returning the likelihood of each category's presence.
| Field | Description | Requirement |
|---|---|---|
| Api key | Google Cloud Vision API Key | Required |
| Image path/url | URL of the image in Google Cloud Storage | Optional |
| Base64 | Base64 encoded string of the image file | Optional |
| Response variable name | Name of the variable to store the HTTP response | Required |
Action Types & Examples
Detect Content
- Format:
JSON String - Example Result:
{"adult": "VERY_UNLIKELY", "spoof": "UNLIKELY", "medical": "POSSIBLE", "violence": "VERY_UNLIKELY", "racy": "LIKELY"}
Implementation Examples
Field Setup - Api key: bb3c53c6-8515-4e34-97c8-8281de60972d - Image path/url: gs://cloud-samples-data/vision/ocr/sampleimage.jpg - Base64: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUF……………./58x/8BX+R/9k= - Response variable name: getResponse
Execution Parameters - Scenario 1: Using Image URL - Api key: bb3c53c6-8515-4e34-97c8-8281de60972d - Image path/url: gs://cloud-samples-data/vision/ocr/sampleimage.jpg - Response variable name: detectionResult - Scenario 2: Using Base64 String - Api key: bb3c53c6-8515-4e34-97c8-8281de60972d - Base64: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUF……………./58x/8BX+R/9k= - Response variable name: detectionResult
Technical Notes
For detailed information regarding Google Cloud Vision's SafeSearch features, refer to the official documentation: Detect Explicit Content (SafeSearch).
The
Image path/urlandBase64fields are mutually exclusive; only one of these fields should be configured for the activity to execute successfully.The
Response variable namewill store the HTTP response as a JSON string, which can then be parsed to access the likelihood scores for each content category.