Face - Verify Face To Person

Verify whether two faces belong to a same person. Compares a face Id with a Person Id

POST {Endpoint}/face/v1.0/verify

URI Parameters

Name In Required Type Description
Endpoint
path True
  • string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True
  • string

Request Body

Name Required Type Description
faceId True
  • string

FaceId of the face, comes from Face - Detect

largePersonGroupId
  • string

Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.

personGroupId
  • string

Using existing personGroupId and personId for fast loading a specified person. personGroupId is created in PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.

personId True
  • string

Specify a certain person in a person group or a large person group. personId is created in PersonGroup Person - Create or LargePersonGroup Person - Create.

Responses

Name Type Description
200 OK

A successful call returns the verification result.

Other Status Codes

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Verify face to person example

Sample Request

POST {Endpoint}/face/v1.0/verify
Ocp-Apim-Subscription-Key: {API key}
{
  "faceId": "c5c24a82-6845-4031-9d5d-978df9175426",
  "personId": "815df99c-598f-4926-930a-a734b3fd651c",
  "largePersonGroupId": "sample_group"
}

Sample Response

{
  "isIdentical": true,
  "confidence": 0.9
}

Definitions

APIError

Error information returned by the API

Error

Error body.

VerifyFaceToPersonRequest

Request body for face to person verification.

VerifyResult

Result of the verify operation.

APIError

Error information returned by the API

Name Type Description
error

Error body.

Error

Error body.

Name Type Description
code
  • string
message
  • string

VerifyFaceToPersonRequest

Request body for face to person verification.

Name Type Description
faceId
  • string

FaceId of the face, comes from Face - Detect

largePersonGroupId
  • string

Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.

personGroupId
  • string

Using existing personGroupId and personId for fast loading a specified person. personGroupId is created in PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.

personId
  • string

Specify a certain person in a person group or a large person group. personId is created in PersonGroup Person - Create or LargePersonGroup Person - Create.

VerifyResult

Result of the verify operation.

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.