Model versioning - Amazon Rekognition

Model versioning

Amazon Rekognition uses deep learning models to perform face detection and to search for faces in collections. It continues to improve the accuracy of its models based on customer feedback and advances in deep learning research. These improvements are shipped as model updates. For example, with version 1.0 of the model, IndexFaces can index the 15 largest faces in an image. Later versions of the model enable IndexFaces to index the 100 largest faces in an image.

When you create a new collection, it uses the most recent version of the model. To improve accuracy, the model is regularly updated.

Collections you create use the latest model version. Faces that you add to new collections by using IndexFaces are detected and stored. However, the version they use differ based on the collection version. You can get the model version of an existing collection by calling DescribeCollection. Differences in behavior include the following:

For collections version 1.0 – 3.0:

  • When a new version of the model is released, your existing version 1.0, 2.0, and 3.0 collections' stored face vectors are not automatically updated using the new model. For example, when version 6.0 is released, your version 1.0 collection's existing stored version 1.0 face vectors remain on version 1.0.

  • When a new version of the model is released, your existing version 1.0, 2.0, and 3.0 collections continue to use the version of the model that they were created with even for new API calls. For example, when version 6.0 is released, a version 1.0 collection continues to use version 1.0 for IndexFaces detection and storage. A version 1.0 collection also continues to use version 1.0 for SearchFaces.

For collection versions 4.0 and higher:

  • When a new version of the model is released, your existing collections’ stored face vectors are not automatically updated using the new model. For example, when version 6.0 is released, your version 5.0 collection’s existing stored version 5.0 face vectors remain on version 5.0.

  • When a new version of the model is released, your existing collections uses the new model for new API calls. For example, when version 6.0 is released, a version 5.0 collection will start using version 6.0 API for IndexFaces detection and storage and version 6.0 for SearchFaces.

  • Since collections support multiple face vector versions, there could be different combinations for Face Searches. For example, when version 6.0 is released, we can have the following combinations for collections version 4.0 and higher:

    • v6 FaceSearchByImage, v4 Face Vector Response

    • v6 FaceSearchByImage, v5 Face Vector Response

    • v6 FaceSearchByImage, v6 Face Vector Response

Note

The highest accuracy is achieved by using the latest version for search and the latest version for stored face vectors (“v6 FaceSearchByImage, v6 Face Vector Response“ above). When you want to achieve the highest possible accuracy, it is recommended to reindex all stored face vectors to the latest version.

Existing face vectors in a collection can't be automatically reindexed to a later version of the model, because Amazon Rekognition doesn't store the source image.

To use the latest model for older versions of stored face vectors, reindex the source images of the older versions into your new collection (Indexfaces). You can determine the versions of all stored face vectors by using ListFaces. When indexing or reindexing, take note of the FaceId in each IndexFaces response. FaceId is a unique identifier that Amazon Rekognition assigns to each face. It is recommended to store and maintain a mapping of FaceId to its corresponding source image to easily coordinate reindexing that face to the latest model version in the future. After reindexing, you need to update your FaceId mappings stored in your application, because the FaceId of the reindexed face vectors are different from the FaceId of the old face vector version.

If you no longer need older versions of stored face vectors, you can delete them by using DeleteFaces. If you no longer need a collection, you can delete it by using DeleteCollection.

Stateless operations, such as DetectFaces, use the latest version of the model.