Adapter - Amazon Rekognition
This page describes version 2.0.13 of the adapter.
Overview
This adapter uses the Amazon Web Service Rekognition API to provide functionality to compare images or detect objects in an image.
Configuration
All of the Amazon adapters, require a region, accessKey and secretKey. The regions list can be in Amazon's documentation. The accessKey and secretKey are accessed by logging in to your amazon account.
Accessing Secret Key
The secretKey can only be accessed once, directly after the accessKey and secretKey are generated.
For this API, there is an optional configuration property similarityThreshold. When this is specified, the score returned from Amazon must be greater than the similarityThreshold for it to be considered a successful match.
Properties
Name |
Display |
Is Required |
Comments |
Type |
Default Value |
Maximum Value |
Minimum Value |
Maximum Length |
Minimum Length |
region |
Region |
True |
The Amazon (AWS) region to run the commands on. |
string |
us-west-1 |
|
|
1024 |
1 |
accessKey |
Access Key |
True |
The Amazon account's Access Key. |
password |
|
|
|
1024 |
1 |
secretKey |
Secret Key |
True |
The Amazon account's Secret Key. |
password |
|
|
|
1024 |
1 |
roleArn |
Role ARN |
False |
The optional role ARN to assume. |
string |
|
|
|
2048 |
1 |
externalId |
External ID |
False |
The external id to pass if assuming a role. |
password |
|
|
|
1024 |
1 |
similarityThreshold |
Similarity Threshold |
False |
The similarity threshold that denotes any scores above this threshold are a positive match. |
integer |
50 |
100 |
1 |
|
|
Commands
Match Images (matchImages)
Given a scanned image and a camera image of a person. Return a score that represents how similar the images are.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
scannedImage |
Scanned Image |
The Scanned Image to send to Match Images. |
True |
string |
cameraImage |
Camera Image |
The Camera Image to send to Match Images. |
True |
string |
Response Properties
Name |
Description |
Type |
score |
The percentage score of how closely the images match. |
string |
Detect Text (detectText)
Detect text in an image and return a comma delimited list of the text.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
image |
Image |
The input image to detect text in. |
True |
string |
Response Properties
Name |
Description |
Type |
concatenatedText |
A comma delimited list of all the detected text. |
string |
detectedText |
An array of detectedTexts. |
array |
detectedText.confidence |
The confidence level that the detected text is text. |
string |
detectedText.text |
One of the detected text groups. This is one of the comma delimited entries in concatenatedText |
string |
detectedText.id |
The id of the detected text item. |
string |
detectedText.parentId |
The id of the detected text's parent. |
string |
detectedText.type |
The type of the detected text. |
string |
Detect Objects (detectObjects)
Detect objects in an image and return a list of objects, with an associated confidence score.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
image |
Image |
The input image to detect objects in. |
True |
string |
Response Properties
Name |
Description |
Type |
status |
The general status of the executed command. Typically a success or failure message. |
string |
detectedObjects |
An array of detected objects. |
array |
detectedObjects.name |
The name of the detected object. |
string |
detectedObjects.confidence |
The confidence level of the detected object name. |
string |
Detect Faces (detectFaces)
Detect any faces in the input image with some attributes about the faces.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
image |
Image |
The input image used to detect faces. |
True |
string |
attributes |
Attributes |
A value that denotes the attributes to return. Recommended value is ALL. This is case sensitive. |
True |
string |
Response Properties
Name |
Description |
Type |
detectedFaces |
The array of detected faces. |
array |
detectedFaces.boxTop |
The top starting point of the bounding box around the detected face. |
string |
detectedFaces.boxLeft |
The left starting point of the bounding box around the detected face. |
string |
detectedFaces.boxHeight |
The height of the bounding box around the detected face. |
string |
detectedFaces.boxWidth |
The width of the bounding box around the detected face. |
string |
detectedFaces.confidence |
The confidence score that the detected face is a person. |
string |
detectedFaces.ageRange.high |
The high end age range of the detected face. |
string |
detectedFaces.ageRange.low |
The low end age range of the detected face. |
string |
detectedFaces.gender.value |
A male or female value indicating the gender detected. |
string |
detectedFaces.gender.confidence |
The confidence of the gender.value property. |
string |
detectedFaces.beard.value |
A true or false value indicating if a beard was detected. |
string |
detectedFaces.beard.confidence |
The confidence level of the beard.value property. |
string |
detectedFaces.mustache.value |
A true or false value indicating if a mustache was detected. |
string |
detectedFaces.mustache.confidence |
The confidence level of the mustache.value property. |
string |
detectedFaces.eyeglasses.value |
A true or false value indicating if eyeglasses were detected. |
string |
detectedFaces.eyeglasses.confidence |
The confidence level of the eyeglasses.value property. |
string |
detectedFaces.sunglasses.value |
A true or false value indicating if sunglasses were detected. |
string |
detectedFaces.sunglasses.confidence |
The confidence level of the sunglasses.value property. |
string |
detectedFaces.eyesOpen.value |
A true or false value indicating if the eyes are open. |
string |
detectedFaces.eyesOpen.confidence |
The confidence level of the eyesOpen.value property. |
string |
detectedFaces.mouthOpen.value |
A true or false value indicating if the mouth is open. |
string |
detectedFaces.mouthOpen.confidence |
The confidence level of the mouthOpen.value property. |
string |
detectedFaces.smile.value |
A true or false value indicating if a smile was detected. |
string |
detectedFaces.smile.confidence |
The confidence level of the smile.value property. |
string |
detectedFaces.brightness |
The detected brightness of the input image. |
string |
detectedFaces.sharpness |
The detected sharpness of the input image. |
string |
detectedFaces.emotions |
Array of emotions. |
array |
detectedFaces.emotions.type |
The type of the emotion. |
string |
detectedFaces.emotions.confidence |
The confidence value of the emotion. |
string |
List Collections (listCollections)
Returns the current list of collection IDs. If the result is truncated, the response will provide a NextToken that can be used in a subsequent request to fetch the next set of collection IDs.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
maxResults |
Maximum Results |
Maximum number of collection IDs to return. |
False |
string |
nextToken |
Pagination Token |
Pagination token from the previous response. |
False |
string |
Response Properties
Name |
Description |
Type |
collectionIds |
The array of Collection IDs. |
array |
faceModelVersions |
Version numbers of the face detection models associated with the collections in the array CollectionIds. |
array |
nextToken |
If the result is truncated, the response provides a NextToken that you can use in the subsequent request to fetch the next set of collection IDs. |
string |
Create Collection (createCollection)
Creates a unique collection identifier to store face properties. You can add faces to the collection using the IndexFaces operation.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being created. |
True |
string |
Response Properties
Name |
Description |
Type |
collectionArn |
Amazon Resource Name of the collection. |
string |
faceModelVersion |
Version number of the face detection model associated with the collection being created. |
string |
statusCode |
HTTP status code indicating the result of the operation. |
string |
Delete Collection (deleteCollection)
Deletes the specified collection. Note that this operation removes all faces in the collection.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being deleted. |
True |
string |
Response Properties
Name |
Description |
Type |
statusCode |
HTTP status code indicating the result of the operation. |
string |
Index Faces (indexFaces)
Detects faces in the input image and adds them to the specified collection.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being created. |
True |
string |
detectionAttributes |
Attributes |
A value that denotes the attributes to return. Recommended value is ALL. This is case sensitive. |
False |
string |
externalImageId |
External Image Identifier |
The ID you want to assign to all the faces detected in the image. |
False |
string |
image |
Image |
The input image used to detect faces. |
True |
string |
qualityFilter |
Quality Filter |
A filter that specifies how much filtering is done to identify faces that are detected with low quality. |
False |
string |
Response Properties
Name |
Description |
Type |
faceModelVersion |
The version number of the face detection model that's associated with the input collection (CollectionId). |
string |
faceRecords |
The array of detected faces that were added to the collection. |
array |
faceRecords.face.externalImageId |
Identifier that you assign to all the faces in the input image. |
string |
faceRecords.face.faceId |
Unique identifier that Amazon Rekognition assigns to the face. |
string |
faceRecords.face.imageId |
Unique identifier that Amazon Rekognition assigns to the input image. |
string |
faceRecords.face.confidence |
Confidence level that the image contains a face |
string |
faceRecords.faceDetail.ageRange.high |
The high end age range of the detected face. |
string |
faceRecords.faceDetail.ageRange.low |
The low end age range of the detected face. |
string |
faceRecords.faceDetail.gender.value |
A male or female value indicating the gender detected. |
string |
faceRecords.faceDetail.gender.confidence |
The confidence of the gender.value property. |
string |
faceRecords.faceDetail.landmarks |
Indicates the location of landmarks on the face. Default attribute. |
array |
faceRecords.faceDetail.landmarks.type |
The type of landmark. |
string |
faceRecords.faceDetail.landmarks.x |
The x-coordinate from the top left of the landmark expressed as the ratio of the width of the image. |
string |
faceRecords.faceDetail.landmarks.y |
The y-coordinate from the top left of the landmark expressed as the ratio of the height of the image. |
string |
faceRecords.faceDetail.beard.value |
A true or false value indicating if a beard was detected. |
string |
faceRecords.faceDetail.beard.confidence |
The confidence level of the beard.value property. |
string |
faceRecords.faceDetail.mustache.value |
A true or false value indicating if a mustache was detected. |
string |
faceRecords.faceDetail.mustache.confidence |
The confidence level of the mustache.value property. |
string |
faceRecords.faceDetail.eyeglasses.value |
A true or false value indicating if eyeglasses were detected. |
string |
faceRecords.faceDetail.eyeglasses.confidence |
The confidence level of the eyeglasses.value property. |
string |
faceRecords.faceDetail.sunglasses.value |
A true or false value indicating if sunglasses were detected. |
string |
faceRecords.faceDetail.sunglasses.confidence |
The confidence level of the sunglasses.value property. |
string |
faceRecords.faceDetail.eyesOpen.value |
A true or false value indicating if the eyes are open. |
string |
faceRecords.faceDetail.eyesOpen.confidence |
The confidence level of the eyesOpen.value property. |
string |
faceRecords.faceDetail.mouthOpen.value |
A true or false value indicating if the mouth is open. |
string |
faceRecords.faceDetail.mouthOpen.confidence |
The confidence level of the mouthOpen.value property. |
string |
faceRecords.faceDetail.smile.value |
A true or false value indicating if a smile was detected. |
string |
faceRecords.faceDetail.smile.confidence |
The confidence level of the smile.value property. |
string |
faceRecords.faceDetail.brightness |
The detected brightness of the input image. |
string |
faceRecords.faceDetail.sharpness |
The detected sharpness of the input image. |
string |
faceRecords.faceDetail.emotions |
Array of emotions. |
array |
faceRecords.faceDetail.emotions.type |
The type of the emotion. |
string |
faceRecords.faceDetail.emotions.confidence |
The confidence value of the emotion. |
string |
orientationCorrection |
The orientation of the input image (counterclockwise direction). |
string |
unindexedFaces |
An array of faces that were detected in the image but were not indexed. |
array |
Search Faces By Image (searchFacesByImage)
Compares the features of the input face with faces in the specified collection.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being created. |
True |
string |
faceMatchThreshold |
Similarity Threshold |
Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%. |
False |
string |
image |
Image |
The input image used to detect faces. |
True |
string |
Response Properties
Name |
Description |
Type |
faceModelVersion |
The version number of the face detection model that's associated with the input collection (CollectionId). |
string |
faceMatches |
The array of matched faces that were added to the collection. |
array |
faceMatches.face.externalImageId |
Identifier that you assign to all the faces in the input image. |
string |
faceMatches.face.faceId |
Unique identifier that Amazon Rekognition assigns to the face. |
string |
faceMatches.face.imageId |
Unique identifier that Amazon Rekognition assigns to the input image. |
string |
faceMatches.similarity |
Confidence in the match of this face with the input face. |
string |
searchedFaceBoundingBox.top |
The top starting point of the bounding box around the searched face. |
string |
searchedFaceBoundingBox.left |
The left starting point of the bounding box around the searched face. |
string |
searchedFaceBoundingBox.height |
The height of the bounding box around the searched face. |
string |
searchedFaceBoundingBox.width |
The width of the bounding box around the searched face. |
string |
searchedFaceConfidence |
The level of confidence that the searchedFaceBoundingBox, contains a face |
string |
Describe Collection (describeCollection)
Describes the specified collection. You can use DescribeCollection to get information, such as the number of faces indexed into a collection and the version of the model used by the collection for face detection.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being described. |
True |
string |
Response Properties
Name |
Description |
Type |
collectionArn |
Amazon Resource Name of the collection. |
string |
faceModelVersion |
Version number of the face detection model associated with the collection. |
string |
creationTimestamp |
The number of milliseconds since the Unix epoch time until the creation of the collection. |
string |
faceCount |
The number of faces that are indexed into the collection. |
string |
List Faces (listFaces)
Returns meta-data for faces in the specified collection. This metadata includes information such as the bounding box coordinates, the confidence (that the bounding box contains a face), and face ID. For an example, see Listing Faces in a Collection.
Request Properties
Name |
Display |
Description |
Is Required |
Type |
collectionId |
Collection Identifier |
ID for the collection being described. |
True |
string |
maxResults |
Maximum Results |
Maximum number of faces to return. |
False |
string |
nextToken |
Pagination Token |
Pagination token from the previous response. |
False |
string |
Response Properties
Name |
Description |
Type |
faces |
The array of Face objects in the collection. |
array |
faces.externalImageId |
Identifier that you assign to all the faces in the input image. |
string |
faces.faceId |
Unique identifier that Amazon Rekognition assigns to the face. |
string |
faces.imageId |
Unique identifier that Amazon Rekognition assigns to the input image. |
string |
faces.confidence |
Confidence level that the image contains a face. |
string |
faces.boundingBox.top |
The top starting point of the bounding box. |
string |
faces.boundingBox.left |
The left starting point of the bounding box. |
string |
faces.boundingBox.height |
The height of the bounding box. |
string |
faces.boundingBox.width |
The width of the bounding box. |
string |
faceModelVersions |
Version numbers of the face detection models associated with the collections in the array faces. |
array |
nextToken |
If the result is truncated, the response provides a NextToken that you can use in the subsequent request to fetch the next set of Faces. |
string |
Release History
Version |
Type |
Description |
Tracking # |
Date |
2.0.1 |
Initial |
First release in the Adapter Type store. |
|
|
2.0.10 |
Maintenance |
Updated third-party components and improved maintainability. |
NAP-11518 |
|
2.0.11 |
Maintenance |
Updated third-party components and improved maintainability. |
NAP-23945 |
2022-11-30 |
2.0.12 |
Bug Fix |
Fixed bug in amazon-polly |
NAP-24722 |
2023-02-02 |
2.0.13 |
Maintenance |
Updated third-party components and improved maintainability. |
NAP-27635 |
2024-07-31 |
Categories