MRekognition: matching specific faces within an image

0

Happy Friday, If this is the wrong place to ask these types of questions, please let me know.

I have a photo with 5 faces in it. I ran some python code to do the indexing/create collection-id, etc. I set the max number of faces to 25 under the assumption when it hits an image with the 5 faces, all get indexed. All works great. When I take that image with 5 faces and go do a match against a folder of images, I will get matches against one of the five faces in the sub-set of images that Rekog thinks are the same person. Again, that works.

My question is how does RekoG know which face of the five to go find and can I programatically be able to choose a different face or only similar images where the same five faces appear. The UI seems to be to put bounding boxes arounf each face and have the user (me) pick the face, then go find more faces like that or pick several or all the bounding boxes and search for whatever I selected.

If I'm on the right track, can somebody point me to the suggested API or AWS sample code to help with this.

Thanks in advance,

Rick

profile picture
已提問 2 個月前檢視次數 475 次
1 個回答
0
已接受的答案

Hi Rick,

Thanks for reaching out to Rekognition!

Based on the question description provided above, I assume the initial experiment was using SearchFacesByImage API.

  • To answer the first part of the question of how does RekoG know which face of the five to go find

Now, given your use case, I would recommend to use SearchFaces. How this works is, since you had already indexed all 5 faces into your collection, you can search the same collection for matching faces given a faceId that's up to your choice. To find the faceIds of these 5 faces, one way is to trace from your previous IndexFaces response where each face detected and stored will be assigned a faceId by the service. Alternatively, you can also check them later by using ListFaces API with filtering your image id. Here is more info about SearchFaces in our API documentation: https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchFaces.html.

Additional reference:

Hope this helps! And feel free to reach out again if there's any other question you might have!

AWS
AWS-hcs
已回答 1 個月前
  • This is excellent, thank you for the detailed reply.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南