Face Recognition Operations - Verify From Large Person Group

Verify whether a face belongs to a person in a Large Person Group.

Note

    • 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.
    • For the scenarios that are sensitive to accuracy please make your own judgment.
    • The 'recognitionModel' associated with the query face should be the same as the 'recognitionModel' used by the Large Person Group.
POST {endpoint}/face/{apiVersion}/verify

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
faceId True

string

The faceId of the face, come from "Detect".

largePersonGroupId True

string

Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group".

personId True

string

Specify a certain person in Large Person Group.

Responses

Name Type Description
200 OK

VerificationResult

A successful call returns the verification result.

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

Verify from LargePersonGroup

Sample request

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

{
  "faceId": "c5c24a82-6845-4031-9d5d-978df9175426",
  "personId": "815df99c-598f-4926-930a-a734b3fd651c",
  "largePersonGroupId": "your_large_person_group"
}

Sample response

{
  "isIdentical": true,
  "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.

VerificationResult

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

VerificationResult

Verify result.

Name Type Description
confidence

number

A number indicates the similarity confidence of whether two faces belong to the same person, or whether the face belongs to the person. By default, isIdentical is set to True if similarity confidence is greater than or equal to 0.5. This is useful for advanced users to override 'isIdentical' and fine-tune the result on their own data.

isIdentical

boolean

True if the two faces belong to the same person or the face belongs to the person, otherwise false.