Skip to main content

Rekognition actions

The AWS Rekognition extension provides actions for searching and identifying faces in images within Workforce flows. Use these actions to perform facial recognition against a configured Rekognition collection as part of your automated content processes.

You can install this action extension from the Workforce integration marketplace.

Tip

These action descriptions cover the most commonly used inputs and outputs. When designing flows, you may also notice additional input and output variables.

Prerequisites
Link copied!

The Amazon Rekognition extension uses AWS credentials and a Rekognition collection for authentication. Configure the following environment variables before using the action.

VariableTypeRequiredDescription
AWS_REGIONstringYesThe AWS region used by the extension.
AWS_REKOGNITION_KEYstringYesThe AWS Rekognition access key. This value is write-only.
AWS_REKOGNITION_SECRETstringYesThe AWS Rekognition secret key. This value is write-only.
AWS_REKOGNITION_COLLECTION_IDstringYesThe Rekognition collection ID used for face search.

For details of how to obtain these authentication credentials, see the Amazon Rekognition documentation.

Supported AWS regions
Link copied!

The AWS_REGION setting must use one of the regions supported by the extension, for example us-east-1, us-west-2, eu-west-1, eu-west-2, or ap-southeast-1.

Search faces by image
Link copied!

Searches for faces in an image and returns matching faces from the configured Amazon Rekognition collection.

Inputs

FieldTypeRequiredDescription
imageUrlstringYesURL of the image containing faces to search.

Outputs

The action returns the matching faces found for the supplied image, together with information about the searched face and the face model used.

OutputTypeDescription
FaceMatchesarrayA list of face match objects. See Face match object below
FaceModelVersionstringThe version of the face model used for the search
SearchedFaceBoundingBoxobjectBounding box of the face used as the search input (Height, Left, Top, Width)
SearchedFaceConfidencenumberConfidence score for the face detected in the input image

Face match object

Each entry in the FaceMatches array contains the following fields:

FieldTypeDescription
SimilaritynumberSimilarity score between the searched face and the matched face
Face.FaceIdstringUnique identifier for the matched face
Face.ImageIdstringIdentifier of the image containing the matched face
Face.ExternalImageIdstringUser-defined identifier associated with the matched face's image
Face.ConfidencenumberConfidence score for the matched face
Face.IndexFacesModelVersionstringVersion of the model used when the face was indexed
Face.BoundingBoxobjectBounding box of the matched face in its source image (Height, Left, Top, Width)

Example output

{
"FaceMatches": [
{
"Face": {
"BoundingBox": {
"Height": 0.25,
"Left": 0.35,
"Top": 0.2,
"Width": 0.18
},
"Confidence": 99.9,
"ExternalImageId": "example-person",
"FaceId": "12345678-1234-1234-1234-123456789012",
"ImageId": "87654321-4321-4321-4321-210987654321",
"IndexFacesModelVersion": "7.0"
},
"Similarity": 98.5
}
],
"FaceModelVersion": "7.0",
"SearchedFaceBoundingBox": {
"Height": 0.24,
"Left": 0.34,
"Top": 0.19,
"Width": 0.17
},
"SearchedFaceConfidence": 99.8
}

Adding actions to flows

Inputs, outputs and ports

Input field variables

Developing extensions