question

MarkOtway-4437 avatar image
0 Votes"
MarkOtway-4437 asked YutongTie-MSFT commented

How to combine Faces under a single ID?

I've added Azure Face recognition to my photo management app. The process is:

  1. Photos are scanned for faces, and any which contain faces are submitted to Azure Face

  2. Azure recognises the face, returning the GUID associated with the recognised face (or a new GUID if it's one that hasn't been seen before

  3. My users then give a name to the faces, which is associated with the Azure GUID, and stored in the DB

  4. Future faces that match the same GUID can then have the name displayed automatically.

Consider the following scenario: Azure processes two images/faces for the same person, but for various reasons doesn't recognise them as the same person and so creates two different GUIDs, one for each face. The human user then recognises that they're both the same person, so applies the same name to both GUIDs.

My question is, how can I then retrospectively update Azure to 'merge' or combine those two GUIDs into one? Essentially I want this:

Azure finds the following two faces:

  • 22a270f3-fe32-4459-9ca6-062213612a14

  • 347cfc58-42d9-4982-944a-6ca4c5efafb4

User names them as

22a270f3-fe32-4459-9ca6-062213612a14 == John Smith
347cfc58-42d9-4982-944a-6ca4c5efafb4 == John Smith

I want to then merge the two so that both faces in the two images will be associated with (arbitrarily) the first GUID (22a270f3-fe32-4459-9ca6-062213612a14) for John Smith. The second GUID (347cfc58-42d9-4982-944a-6ca4c5efafb4) should be discarded. And finally, as a side effect, the training for both faces should be combined so that in future, a face that would be recognised as 347cfc58-42d9-4982-944a-6ca4c5efafb4 (i.e., the 'second' John Smith) will now return 22a270f3-fe32-4459-9ca6-062213612a14 as the GUID, matching with the first John Smith.

Is this possible? And if so what is the API that I would use to merge these two entries.

Note that I don't mind if to merge them, I have to input two GUIDs, and get a third (new) GUID returned, that represents the 'combined' set of recognised faces.

If it matters, I'm using C# and the Microsoft.Azure.CognitiveServices.Vision.Face v2.8.0-preview.1 client library, and the PersonDirectory APIs.

azure-face
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Ten,

Thanks for reaching out to us. I will double check this with product team to see any workaround or roadmap here.

Regards,
Yutong

0 Votes 0 ·

1 Answer

MarkOtway-4437 avatar image
0 Votes"
MarkOtway-4437 answered YutongTie-MSFT commented

Hi, it's nearly 2 months since I asked this question - do you have any response from the team about this?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MarkOtway-4437 Sorry for the delay, I did re-escalate this again and get below response:

  1. Currently, this is not supported to add an existing face ID to a person. We might add this to our roadmap in future

  2. There is a /group API that can automatically group faces based on similarity. Check it out here https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395238

  3. If you still have the original images, there is a work around. You could call Person - AddFace API to add the faces from person B to person A. After that, delete person B.
    https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/599adf2a3a7b9412a4d53f42

I am sorry for the inconvenience.

Regards,
Yutong


0 Votes 0 ·