Face Recognition Operations - Verify Face To Face
Verify whether two faces belong to a same person.
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 both faces should be the same.
POST {endpoint}/face/{apiVersion}/verify
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 |
---|---|---|---|
faceId1 | True |
string |
The faceId of one face, come from "Detect". |
faceId2 | True |
string |
The faceId of another face, come from "Detect". |
Responses
Name | Type | Description |
---|---|---|
200 OK |
A successful call returns the verification result. |
|
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
Verify Face to Face
Sample request
POST {endpoint}/face/v1.1-preview.1/verify
{
"faceId1": "c5c24a82-6845-4031-9d5d-978df9175426",
"faceId2": "3aa87e30-b380-48eb-ad9e-1aa54fc52bd3"
}
Sample response
{
"isIdentical": true,
"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. |
Verification |
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 |
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. |