Face Recognition Operations - Identify From Dynamic Person Group

1-to-many identification to find the closest matches of the specific query person face from a Dynamic Person Group.
For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the Dynamic Person Group (given by dynamicPersonGroupId), and return candidate person(s) for that face ranked by similarity confidence.

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.
    • The Identify operation can only match faces obtained with the same recognition model, that is associated with the query faces.
POST {endpoint}/face/{apiVersion}/identify

URI Parameters

Name In Required Type Description
apiVersion
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
dynamicPersonGroupId True

string

DynamicPersonGroupId of the target PersonDirectory DynamicPersonGroup to match against.

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].

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

IdentificationResult[]

A successful call returns the identified candidate person(s) for each query face.

Other Status Codes

FaceErrorResponse

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 DynamicPersonGroup

Sample Request

POST {endpoint}/face/v1.1-preview.1/identify

{
  "faceIds": [
    "c5c24a82-6845-4031-9d5d-978df9175426"
  ],
  "dynamicPersonGroupId": "your_dynamic_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
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.

FaceErrorResponse

A response containing error details.

IdentificationCandidate

Candidate for identify call.

IdentificationResult

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

FaceError

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

IdentificationCandidate[]

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.