Check Image Safety
Analyzes images for potentially unsafe content using Google Vision API's safe search detection feature.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Vision Client Id - The unique identifier of the Vision API connection, typically obtained from the Connect node.
- Image Path - The file path to the image to analyze for safety.
Options
No additional options available for this node.
Output
- Text - An object containing safety assessment results with the following properties:
- Adult - Likelihood of adult content
- Medical - Likelihood of medical content
- Racy - Likelihood of racy content
- Spoof - Likelihood of spoof content
- Violence - Likelihood of violent content
How It Works
The Check Image Safety node analyzes an image to detect potentially unsafe content using Google Vision API's safe search detection. When executed, the node:
- Retrieves the Vision API client using the provided client ID
- Validates that the image path is not empty
- Opens and reads the image file from the specified path
- Creates a Vision API image object from the file
- Calls the DetectSafeSearch method to analyze the image for unsafe content
- Processes the results and returns the safety assessment
Requirements
- A valid connection to Vision API established with the Connect node
- Valid Google Cloud credentials with appropriate permissions
- An image file accessible from the specified path
- Enabled Vision API in your Google Cloud project
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Vision Client ID
- Empty image path
- Invalid image file path
- File read errors
- Invalid image format
- Network connectivity issues
- Vision API service errors
- Authentication failures
Usage Notes
- The Vision Client ID must be obtained from a successful Connect node execution
- The image file must be accessible from the specified path
- Supported image formats include JPEG, PNG, GIF, BMP, and TIFF
- Each safety category is assessed with a likelihood level (UNKNOWN, VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, VERY_LIKELY)
- This node is useful for content moderation and filtering applications
- Results can be used to automatically flag or filter images based on safety criteria
- The safety detection is not 100% accurate and should be used as part of a broader content moderation strategy