Amazon Index Faces
How it Works
The Index Faces action registers facial images into Amazon Rekognition so they can be matched later during face recognition. Before using this action, ensure you’ve created a dataset under the Training Photo Production group in CatDV. Each dataset should be named after the person it represents and contain a few high-quality, well-lit photos.
In folder structure, it would appear this way:
You can create your Worker Watch Folder action and point to the path of your custom faces folder like below:
Once published, the catalogs will be in this format – a person is assigned their own catalog (Please note, do not put your persons in a catalog folder, the indexing of faces will not work):
To assist with building these datasets, CatDV provides a Snapshot Server Plugin that can automatically extract face crops from footage and save them to a target folder. This helps streamline the creation of training material.
It’s important to understand that Amazon Rekognition does not train or adapt a recognition model based on your images. Instead, Rekognition detects each face and creates a fixed “face signature” (feature vector) for it. When matching, Rekognition compares these stored vectors to the face signature of a new image to identify similar faces. No learning or model adjustment occurs, matching is purely based on vector similarity.
Each face is indexed with an External Image ID, which CatDV sets using the name of the catalog where the face images are grouped. This ID is stored with the face in Rekognition and is returned as part of any match result. Rekognition itself does not assign or manage identity labels, it simply returns the External Image ID provided during indexing, which CatDV uses as the person’s identity during recognition.
When setting up the Index Faces worker, make sure to:
Set the Quality Filter to HIGH to ensure only images meeting Amazon’s recommended quality are indexed.
Any spaces or unsupported characters in the catalog name are automatically sanitized when generating the External Image ID, to comply with Rekognition naming rules (e.g., “John Doe” becomes John_Doe).
If an image fails to index, the Index Error field will report the issue (e.g., poor quality or no face detected), making it easy to troubleshoot.
All indexed faces are stored in a single Rekognition collection named CatDV-Custom-Faces. This collection is automatically created if it doesn't already exist. Per Amazon Rekognition’s service limits, a collection can hold up to 20 million face vectors, which typically supports around 4 million individuals if you provide five photos per person.
For further details on image quality, pose guidelines, and dataset structure, refer to the Best Practice section.
Import Worker Actions
While you're free to define your own workflows, pre-defined workflows are included in the WorkerActions folder to help you get started quickly. Simply drag and drop these files into the Worker GUI to import them. With minimal configuration, your workflow will be ready to use.
WorkerActions/Amazon AI – Index Faces.catdv
Best Practices
Managing Indexed Faces:
Index with Care: Only index high-quality, well-lit, and representative photos of individuals. Once indexed, faces remain in the Rekognition collection unless explicitly deleted.
Unindexing is Manual: The plugin does not currently support unindexing faces. Deleting a photo from CatDV does not remove it from the Rekognition face collection. To unindex a face, you must use the AWS CLI or Rekognition API with the DeleteFaces operation.
Avoid Over-Indexing: Each collection can support up to 20 million faces, but indexing redundant or irrelevant faces can inflate costs and degrade accuracy. Only index what’s needed.
Face Index Guide:
Use clear, well-lit photos. Try to avoid blurry images caused by movement of the person or the camera.
Use photos with even lighting on the face, avoiding shadows or uneven lighting.
Use photos where the face stands out clearly from the background. A plain, high-contrast background works well.
Make sure the person’s eyes are open and clearly visible in the photo.
Use photos of faces with neutral expressions, closed mouths, and little to no smile
Use photos where the face takes up a large part of the image. The larger the face, the more accurate the match.
Use color images.
Use a photo where the person’s full head and shoulders are visible. Don’t use images that are too closely cropped to just the face or where the face is blocked.
Avoid photos where the face is blocked by items like headbands or masks.
Indexing recent face images ensures more accurate and reliable face matching in Amazon Rekognition, as it reflects current facial features and reduces mismatches caused by appearance changes over time.
When creating a face collection using IndexFaces, include at least five photos of each person showing their face from different angles—straight on, turned slightly left, turned slightly right, looking slightly down, and looking slightly up. This helps Amazon Rekognition recognize the person more accurately.
Make sure the face in the image is facing mostly forward. It can be slightly tilted up, down, or to the side, but not too much. Looking down should be less than 30 degrees and turning left or right should be less than 45 degrees. Tilting the head sideways (ear to shoulder) doesn’t matter.
If the person’s photo includes other people, please crop it to only include the person you want to index.
Example of a bad photo | Example of a good photo |
This photo includes Alice (foreground) and two other people in the background. Why this doesn’t work? The next time you detect faces in ay video or image, you may encounter that the results will print the second and third person as Alice. | This is the ideal way to do your dataset photo.
|
Worker Action Settings
The settings available in the Worker Plugin are:
S3 Volume | The S3 remote volume identifier is required to access the S3 bucket. If you haven't set up a remote volume yet, please refer to the Authentication section. Note: The identifier must be enclosed in square brackets []. |
AWS Access Key (optional) | Define only if you wish to use a different account to perform the operation. |
AWS Secret Key (required) | Used as part of the authentication. |
Quality Filter | Generally, HIGH is recommended for better accuracy, while AUTO is a flexible choice for most scenarios. NONE: No filtering is applied. All faces, regardless of quality, are indexed. This could lead to lower accuracy since poor-quality images might be indexed. AUTO: Amazon Rekognition automatically determines the quality of images and applies the best filter accordingly. This is a balanced option for typical use cases. LOW: A lower quality threshold is applied, meaning images with slight imperfections or lower resolution may still be indexed. This increases the risk of inaccurate face recognition. MEDIUM: This filter ensures that only images with moderate quality are indexed. It offers a balance between filtering and allowing a wider range of images to be indexed. HIGH: Only high-quality, well-lit, and clear images are indexed. This setting improves face recognition accuracy by ensuring that only the best images are processed. |
Advanced Properties
For system builders and power users, here are some additional plugin options which can be set in the Worker Node Advanced Properties box:
Property key | Valid range (default) | Description |
amazonAI.debug | true/false (false) | Logs the full Amazon API response. Useful for debugging purposes. Do not enable unless needed, as the response can be very large. |
Usage Cost
Amazon AI USD pricing as of Summer 2020 is:
12 months free - 5000 images per month
then $0.001 per image (further discounts for more than 1 million images / month)
More recent pricing is determined based on the specific API operations you use, which are categorized into different groups. For index faces action it is using Group1: IndexFaces.
For latest pricing information refer to Amazon official site https://aws.amazon.com/rekognition/pricing/.
Please be mindful of the AWS service costs associated with each AI operation, especially as you scale up usage of the plugin. Quantum Corp. does not accept any liability for AWS service costs incurred as a result of using this software, regardless of if the usage incurred was intentional or not.