How to combine Faces under a single ID?

Mark Otway 1 Reputation point
2021-09-09T08:07:07.387+00:00

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
Azure Face
An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.
154 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mark Otway 1 Reputation point
    2021-10-25T20:13:39.6+00:00

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