Face Recognition Operations - Identify From Person Group
1-to-many identification to find the closest matches of the specific query person face from a Person Group.
For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the Person Group (given by personGroupId), and return candidate person(s) for that face ranked by similarity confidence. The Person Group should be trained to make it ready for identification. See more in "Train 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.
- The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target 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]. |
personGroupId | True |
string |
personGroupId of the target Person Group, created by "Create 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 PersonGroup
Sample request
POST {endpoint}/face/v1.2-preview.1/identify
{
"faceIds": [
"c5c24a82-6845-4031-9d5d-978df9175426"
],
"personGroupId": "your_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. |