1
votes

I am using amazon recognition to create an API to compare faces. The input or source image would be a single one whereas for the target images I have a collection of images (let's say database). How can I compare a face from a single image to faces from multiple images in batch?

1
take a look at this other question stackoverflow.com/questions/57043322/…Hugo

1 Answers

0
votes

You should:

  • Create a Face Collection using CreateCollection()
  • Add faces to the Face Collection using IndexFaces()
  • Compare a picture against the Face Collection using SearchFacesByImage()

From SearchFacesByImage - Amazon Rekognition:

For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection.

To search for all faces in an input image, you might first call the IndexFaces operation, and then use the face IDs returned in subsequent calls to the SearchFaces operation.

You can also call the DetectFaces operation and use the bounding boxes in the response to make face crops, which then you can pass in to the SearchFacesByImage operation.