Azure Face API - Searching for Faces in Photographs | AI-102 Exam Answer

Azure Face API Face Search | AI-102 Exam Answer

Question

You are tasked to use Face API in your application to search for a face of a person in a given set of photographs within a specified internal threshold.

Since the set of pictures is large, you decide to use a large face list to persist face ids.

This also meets your requirement that the ids will not expire.

Given the scenario, review the code snippet given below and complete it by selecting correct answer choices.

(choose two answers)

POST https://{endpoint}/face/v1.0/…………………………………… { "faceId": "d9c26a66-6834-3331-9f5d-978d456g75426", "largeFaceListId": "largeFaceListID1", "maxNumOfCandidatesReturned": 8, "mode": "..............................................." } 

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: B and C

Here is the completed JSON code

<pre class="brush:java;">POST https://{endpoint}/face/v1.0/findsimilars.

{

"faceId": "d9c26a66-6834-3331-9f5d-978d456g75426",

"largeFaceListId": "largeFaceListID1",

"maxNumOfCandidatesReturned": 8,

"mode": “matchPerson”

}

</pre>Option A is incorrect because the detect function is used to identify rectangular coordinates of a face.

It provides the identifier for the face that will be used for identification, finding a similar face or verification of a face.

Option B is correct because the requirement is to find similar faces.

Option C is correct because the requirement is to find a known person in a given set of photographs.

matchperson is the correct mode of findsimilars API for this scenario.

Option D is incorrect because matchFace ignores the internal threshold and finds faces where the similarity is even low.

Option E is incorrect because the identify function is used for finding closest matches to a person group or large person group.

However, the requirement here is to use a large group list.

Reference:

To learn more about Face API call, use the link given below:

The code snippet provided is using the Face API to search for a face of a person in a given set of photographs within a specified internal threshold. The scenario mentions that a large face list is being used to persist face IDs, which will not expire. The task is to select the correct answer choices to complete the code snippet.

The API endpoint being used in the code snippet is a POST request. The request body contains the following parameters:

  • faceId: The ID of the face that needs to be searched for.
  • largeFaceListId: The ID of the large face list that contains the persisted face IDs.
  • maxNumOfCandidatesReturned: The maximum number of matching faces to be returned.
  • mode: The mode of the operation being performed.

The correct answer choices to complete the code snippet are:

B. findsimilars - The findsimilars mode of the Face API is used to find faces in a large face list that are similar to a given face. This mode is suitable for the scenario mentioned in the question, where a face needs to be searched for in a set of photographs within a specified internal threshold.

E. identify - The identify mode of the Face API is used to identify a face in a large face list by comparing it to all the faces in the list. This mode is not suitable for the scenario mentioned in the question, as it would compare the given face with all the faces in the large face list, which would be inefficient for a large set of photographs.

Therefore, the correct code snippet would be:

<pre class="brush:java;">POST https://{endpoint}/face/v1.0/findsimilars { "faceId": "d9c26a66-6834-3331-9f5d-978d456g75426", "largeFaceListId": "largeFaceListID1", "maxNumOfCandidatesReturned": 8, "mode": "findsimilars" }</pre>