Skip to main content

AWS Rekognition DetectLabels

AWS Rekognition DetectLabels transformation allows users to automatically detect objects, scenes, and concepts within images.

Using machine learning algorithms, the DetectLabels API analyzes visual content and returns a list of labels with associated confidence scores. These labels can include things like a person, car, dog, mountain, beach, and many others.

This service is useful for a wide range of applications, such as image search, content moderation, and automatic metadata generation.

info

Installing the AWS Rekognition add-on is a must for using this transformation.


Params

Maximum Labels (l)

This parameter in AWS Rekognition DetectLabels is used to specify the maximum number of labels (objects) that should be returned in the API response.

Available values are from 0 to 10. The default value is 5.

If the number of labels detected in an image is greater than the specified l value, AWS Rekognition DetectLabels will only return the top MaxLabels labels with the highest confidence scores.

For example, if l is set to 1 and Rekognition detects 2 labels in an image, it will return only the top 1 label with the highest confidence scores.

Adjusting the l parameter can be useful in cases where you only need to retrieve the most relevant labels for your application or when you want to reduce the size of the API response.

Minimum Confidence (c)

This parameter in AWS Rekognition DetectLabels is used to specify the minimum confidence level required for a label to be included in the API response.

Available values are from 0 to 99. The default value is 55.

If the confidence score for a label is less than the specified c value, the label will not be included in the API response. This can be useful for filtering out labels with low confidence scores that may not be relevant to your application.

For example, if c is set to 70 and Rekognition detects 20 labels in an image, it will return only the labels with confidence scores of 70 or higher.

Adjusting the c parameter can be useful in cases where you only want to retrieve labels that have a high level of confidence or when you want to filter out labels that are not relevant to your use case.

note

Instead of getting the output in a traditional CDN URL, you will get a JSON output from the Context API while the CDN URL will return the original image without any modifications.

The Context API Response tab includes an array of labels (Head, Person, Face, Teen, and Girl are the labels), where each label is represented by a JSON object that contains the following information:

PropertyDescription
NameA string value that represents the name of the label detected in the media content.
ConfidenceA float value between 0 and 100 represents the level of confidence that the label is present in the media content.
InstancesAn array of instances where each instance is represented by a JSON object that contains a BoudingBox or Confidence. Learn More
Instances[].ConfidenceA float value between 0 and 100 represents the level of confidence that the detected label is present in the instance.
Instances[].BoudingBoxIdentifies the bounding box around the label, face, text, object of interest, or personal protective equipment. The left (x-coordinate) and top (y-coordinate) are coordinates representing the top and left sides of the bounding box. The width and height values represent the dimensions of the bounding box as a ratio of the overall image dimension. Learn More
Instances[].BoudingBox.HeightHeight of the bounding box as a ratio of the overall image height.
Instances[].BoudingBox.WidthWidth of the bounding box as a ratio of the overall image width.
Instances[].BoudingBox.TopTop coordinate of the bounding box as a ratio of the overall image height.
Instances[].BoudingBox.LeftLeft coordinate of the bounding box as a ratio of the overall image width.
Parents[]A parent label for a label. A label can have 0, 1, or more parents.
Parents[].NameThe name of the parent label. Each parent label is represented by a JSON object that contains the name.

Overall, the Context API Response provides information about the labels detected in the media content, along with their location, confidence level, and any parent labels that may be relevant. This information can be used to perform various tasks such as image classification, content moderation, and object recognition.

To learn more about this transformation, click here.

Transform and enhance your images using our powerful AI technology. Organize your images in more efficient manner and our extensible APIs enables seamless integration with your system unleashing the power of our platform. Join the large community of users who use PixelBin to transform their image libraries and achieve excellent performance

Is this page useful?