Face Recognition Operations - Identify From Large Person Group
1-to-many identification to find the closest matches of the specific query person face from a Large Person Group.
For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the Large Person Group (given by largePersonGroupId), and return candidate person(s) for that face ranked by similarity confidence. The Large Person Group should be trained to make it ready for identification. See more in "Train Large Person Group".
Note
-
- The algorithm allows more than one face to be identified independently at the same request, but no more than 10 faces.
- Each person could have more than one face, but no more than 248 faces.
- Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
- Number of candidates returned is restricted by maxNumOfCandidatesReturned and confidenceThreshold. If no person is identified, the returned candidates will be an empty array.
- Try "Find Similar" when you need to find similar faces from a Face List/Large Face List instead of a Person Group/Large Person Group.
- The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target Person Group or Large Person Group.
POST {endpoint}/face/{apiVersion}/identify
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string |
API Version |
endpoint
|
path | True |
string uri |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://{resource-name}.cognitiveservices.azure.com). |
Request Body
Name | Required | Type | Description |
---|---|---|---|
faceIds | True |
string[] |
Array of query faces faceIds, created by the "Detect". Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. |
largePersonGroupId | True |
string |
largePersonGroupId of the target Large Person Group, created by "Create Large Person Group". Parameter personGroupId and largePersonGroupId should not be provided at the same time. |
confidenceThreshold |
number |
Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates. |
|
maxNumOfCandidatesReturned |
integer |
The range of maxNumOfCandidatesReturned is between 1 and 100. Default value is 10. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
A successful call returns the identified candidate person(s) for each query face. |
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
Ocp-Apim-Subscription-Key
The secret key for your Azure AI Face subscription.
Type:
apiKey
In:
header
AADToken
The Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://api.example.com/oauth2/authorize
Token URL:
https://api.example.com/oauth2/token
Scopes
Name | Description |
---|---|
https://cognitiveservices.azure.com/.default |
Examples
Identify from LargePersonGroup
Sample request
POST {endpoint}/face/v1.1-preview.1/identify
{
"faceIds": [
"c5c24a82-6845-4031-9d5d-978df9175426"
],
"largePersonGroupId": "your_large_person_group_id",
"maxNumOfCandidatesReturned": 9,
"confidenceThreshold": 0.7
}
Sample response
[
{
"faceId": "c5c24a82-6845-4031-9d5d-978df9175426",
"candidates": [
{
"personId": "85c0c630-c9c9-40f8-8a4e-f9ae4f926ea5",
"confidence": 0.8
}
]
}
]
Definitions
Name | Description |
---|---|
Face |
The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages. |
Face |
A response containing error details. |
Identification |
Candidate for identify call. |
Identification |
Identify result. |
FaceError
The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
message |
string |
A human-readable representation of the error. |
FaceErrorResponse
A response containing error details.
Name | Type | Description |
---|---|---|
error |
The error object. |
IdentificationCandidate
Candidate for identify call.
Name | Type | Description |
---|---|---|
confidence |
number |
Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]. |
personId |
string |
personId of candidate person. |
IdentificationResult
Identify result.
Name | Type | Description |
---|---|---|
candidates |
Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array. |
|
faceId |
string |
faceId of the query face. |