AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Detects unsafe content in a specified JPEG or PNG format image. Use DetectModerationLabels
to moderate images depending on your requirements. For example, you might want to
filter images that contain nudity, but not images containing suggestive content.
To filter images, use the labels returned by DetectModerationLabels
to determine
which types of content are appropriate.
For information about moderation labels, see Detecting Unsafe Content in the Amazon Rekognition Developer Guide.
You pass the input image either as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.
You can specify an adapter to use when retrieving label predictions by providing a
ProjectVersionArn
to the ProjectVersion
argument.
For .NET Core this operation is only available in asynchronous form. Please refer to DetectModerationLabelsAsync.
Namespace: Amazon.Rekognition
Assembly: AWSSDK.Rekognition.dll
Version: 3.x.y.z
public virtual DetectModerationLabelsResponse DetectModerationLabels( DetectModerationLabelsRequest request )
Container for the necessary parameters to execute the DetectModerationLabels service method.
Exception | Condition |
---|---|
AccessDeniedException | You are not authorized to perform the action. |
HumanLoopQuotaExceededException | The number of in-progress human reviews you have has exceeded the number allowed. |
ImageTooLargeException | The input image size exceeds the allowed limit. If you are calling DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. |
InternalServerErrorException | Amazon Rekognition experienced a service issue. Try your call again. |
InvalidImageFormatException | The provided image format is not supported. |
InvalidParameterException | Input parameter violated a constraint. Validate your parameter before calling the API operation again. |
InvalidS3ObjectException | Amazon Rekognition is unable to access the S3 object specified in the request. |
ProvisionedThroughputExceededException | The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition. |
ResourceNotFoundException | The resource specified in the request cannot be found. |
ResourceNotReadyException | The requested resource isn't ready. For example, this exception occurs when you call DetectCustomLabels with a model version that isn't deployed. |
ThrottlingException | Amazon Rekognition is temporarily unable to process the request. Try your call again. |
.NET Framework:
Supported in: 4.5, 4.0, 3.5