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
gefragt vor 2 Monaten475 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
beantwortet vor einem Monat
  • This is excellent, thank you for the detailed reply.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen