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달 전474회 조회
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
답변함 한 달 전
  • This is excellent, thank you for the detailed reply.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠