Exam Preparation Quiz

Question 9 of 75

Complete Face API Method Call For Adding Face Images

MDFT Pro, a well-known training agency, is developing a comprehensive student recognition system using the Azure Face API. Mark, the Systems Architect, needs to implement functionality that adds multiple training photos of each student to their person group profile to improve facial recognition accuracy during attendance tracking.

The application processes batches of student photos stored locally, with each student having multiple profile images in JPG format. The code uses asynchronous processing to efficiently upload all images to the Azure Face API service.

Here is the code that needs to be completed:

Parallel.For (0, PersonCount, async i =>
{
    Guid personId = persons[i].PersonId;
    string personImageDir = $"/path/to/person/{i}/images";
    foreach (string imagePath in Directory.GetFiles(personImageDir, "*.jpg"))
    {
        using (Stream t = File.OpenRead(imagePath))
        {
            await faceClient.PersonGroupPerson.__________(personGroupId, personId, t);
        }
    }
});

Which method should be called to add the face image from the stream to the person group?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about Face API methods:
Face API Methods
Next Question