public class DetectModerationLabelsRequest extends AmazonWebServiceRequest implements java.io.Serializable
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.
Constructor and Description |
---|
DetectModerationLabelsRequest()
Default constructor for DetectModerationLabelsRequest object.
|
DetectModerationLabelsRequest(Image image)
Constructs a new DetectModerationLabelsRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
HumanLoopConfig |
getHumanLoopConfig()
Sets up the configuration for human evaluation, including the
FlowDefinition the image will be sent to.
|
Image |
getImage()
The input image as base64-encoded bytes or an S3 object.
|
java.lang.Float |
getMinConfidence()
Specifies the minimum confidence level for the labels to return.
|
int |
hashCode() |
void |
setHumanLoopConfig(HumanLoopConfig humanLoopConfig)
Sets up the configuration for human evaluation, including the
FlowDefinition the image will be sent to.
|
void |
setImage(Image image)
The input image as base64-encoded bytes or an S3 object.
|
void |
setMinConfidence(java.lang.Float minConfidence)
Specifies the minimum confidence level for the labels to return.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DetectModerationLabelsRequest |
withHumanLoopConfig(HumanLoopConfig humanLoopConfig)
Sets up the configuration for human evaluation, including the
FlowDefinition the image will be sent to.
|
DetectModerationLabelsRequest |
withImage(Image image)
The input image as base64-encoded bytes or an S3 object.
|
DetectModerationLabelsRequest |
withMinConfidence(java.lang.Float minConfidence)
Specifies the minimum confidence level for the labels to return.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public DetectModerationLabelsRequest()
public DetectModerationLabelsRequest(Image image)
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you
might not need to base64-encode image bytes passed using the
Bytes
field. For more information, see Images in
the Amazon Rekognition developer guide.
public Image getImage()
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you might not
need to base64-encode image bytes passed using the Bytes
field. For more information, see Images in the Amazon Rekognition
developer guide.
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you might
not need to base64-encode image bytes passed using the
Bytes
field. For more information, see Images in the
Amazon Rekognition developer guide.
public void setImage(Image image)
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you might not
need to base64-encode image bytes passed using the Bytes
field. For more information, see Images in the Amazon Rekognition
developer guide.
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you
might not need to base64-encode image bytes passed using the
Bytes
field. For more information, see Images in
the Amazon Rekognition developer guide.
public DetectModerationLabelsRequest withImage(Image image)
The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you might not
need to base64-encode image bytes passed using the Bytes
field. For more information, see Images in the Amazon Rekognition
developer guide.
Returns a reference to this object so that method calls can be chained together.
image
- The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
If you are using an AWS SDK to call Amazon Rekognition, you
might not need to base64-encode image bytes passed using the
Bytes
field. For more information, see Images in
the Amazon Rekognition developer guide.
public java.lang.Float getMinConfidence()
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Constraints:
Length: 0 - 100
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to 50
percent.
public void setMinConfidence(java.lang.Float minConfidence)
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Constraints:
Length: 0 - 100
minConfidence
- Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to
50 percent.
public DetectModerationLabelsRequest withMinConfidence(java.lang.Float minConfidence)
Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation returns
labels with confidence values greater than or equal to 50 percent.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
minConfidence
- Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
If you don't specify MinConfidence
, the operation
returns labels with confidence values greater than or equal to
50 percent.
public HumanLoopConfig getHumanLoopConfig()
Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
public void setHumanLoopConfig(HumanLoopConfig humanLoopConfig)
Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
humanLoopConfig
- Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
public DetectModerationLabelsRequest withHumanLoopConfig(HumanLoopConfig humanLoopConfig)
Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
Returns a reference to this object so that method calls can be chained together.
humanLoopConfig
- Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.