I've added Azure Face recognition to my photo management app. The process is:
Photos are scanned for faces, and any which contain faces are submitted to Azure Face
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
My users then give a name to the faces, which is associated with the Azure GUID, and stored in the DB
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:
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.