0
votes

AWS only allows us to compare the largest one face in a group image against collection, then how should I identify other faces in that image.

I know face recognition is possible in an image with multiple faces, but that only provides bounding boxes of faces.

1

1 Answers

0
votes

From SearchFacesByImage - Amazon Rekognition:

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.

IndexFaces detects up to 100 faces in an image and returns Bounding Box information about each face. Therefore, you could:

  • Call IndexFaces on the source image
  • Loop through each face returned and:
    • Extract the Bounding Box for the face
    • Use a graphics library (eg ImageMagick) to crop the source image to that bounding box
    • Pass the cropped image to SearchFaces