Face Match
Module Description
The Face Match module determines whether two facial images belong to the same person.
The Face Match module verifies whether two images belong to the same person.It neither checks the completeness, quality of the face passed as input, nor does it validate whether the inputs are selfies or ID images. The model simply compares the two images and returns whether it is a match or not.
For proper input validation and reliable results, it is recommended to invoke the Selfie Validation module before the Face Match step. Please refer to our Selfie Validation and Quality Checks documents for more details.
Module Inputs
The module supports the following input types:
- Selfie and Selfie
- Selfie and ID Card Image
- ID Card and ID Card Image
Module Configurations
The accuracy of Face Match depends on how inputs are configured. Incorrect mapping (for example, passing selfie on the ID instead of a full ID) can cause lower accuracy and integration issues. To avoid this, ensure each flow is mapped correctly to one of the supported Face Match types:
- Selfie and ID Match
- Selfie and ID Face String Match
- Selfie and Selfie Match
- Selfie and Selfie Face String Match
- ID and ID Match
-
selfie- A selfie image in JPEG, PNG or TIFF format. -
id- An image of the ID card in JPEG, PNG or TIFF format.
This match type compares a selfie against a complete ID card image.
-
selfie- A selfie image in JPEG, PNG or TIFF format. -
idFaceString- An ID card image in base64 format.
This match type compares a selfie against a complete ID card image that has been converted to a base64 string format.
Use case: When identity documents (like Aadhaar, PAN, or Voter ID) are stored in a system in base64 format, verification is enabled by retrieving the selfie on the stored document and comparing it against the user's live selfie to confirm identity authenticity.
-
image1- A selfie image in JPEG, PNG or TIFF format. -
image2- A selfie image in JPEG, PNG or TIFF format. -
type- "selfie".
This match type compares a selfie image against another selfie image.
-
selfie- A selfie image in JPEG, PNG or TIFF format. -
selfieFaceString- A base64 encoded string or base64 data URL of a selfie image.
This match type compares a selfie against a selfie that is in a base64 format.
Use case: In Digilocker workflows, the XML response contains the selfie from an ID in base64 format. This enables seamless identity verification by comparing the government-verified selfie against the user's newly captured selfie, ensuring the person matches their official records.
-
image1- An image of an identity document in JPEG, PNG or TIFF format. -
image2- An image of an identity document in JPEG, PNG or TIFF format. -
type- "id".
This match type compares two complete ID card images against each other.
Module Outputs
The following information is returned in the Results API:
Success Scenario
{
"module": "Selfie ID Match API",
"moduleId":"selfie_id_match_api",
"selfieImageUrl": "<URL>",
"idImageUrl": "<URL>",
"apiResponse": {
"status": "success",
"statusCode": 200,
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"details": {
"match": {
"value": "yes",
"confidence": "high"
}
},
"summary": {
"action": "pass",
"details": []
}
}
}
}
Understanding the Response
| Key | Description | Values Possible |
|---|---|---|
| moduleId | ID of the module | selfie_id_match_api |
| module | Name of the module that was setup in your workflow config | 'Face Match' |
| apiResponse | The API results provided by HyperVerge's backend. If there were multiple attempts made by the user, this key will contain the latest attempt | JSON |
| selfieImageUrl | Singed URL of the selfie image used in this module. This URL would be valid for a duration of 15 minutes | URL |
| idImageUrl | Singed URL of the ID image used in this module. This URL would be valid for a duration of 15 minutes | URL |
Understanding 'apiResponse'
| Key | Description | Values Possible |
|---|---|---|
| match.value | This key tells if the faces have matched(yes) or not matched(no) | yes`no` |
| match.confidence | How confident is the AI model about it's prediction | high/low |
| summary | A final summary based on the checks performed in the module What is summary? Default Summary Config | JSON |
Failure Scenarios
Below is the response in Results API for a typical error scenario.
{
"module": "Selfie ID Match API",
"moduleId" : "selfie_id_match_api",
"selfieImageUrl": "<URL>",
"idImageUrl": "<URL>",
"apiResponse": {
"status": "failure",
"statusCode": 400,
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"error": "Face not detected in one or more images",
"summary": {
"action": "manualReview",
"details": [
{
"code": "118",
"message": "Face not detected in one or more images"
}
]
}
}
}
}
List of Errors Possible
Below are all the errors possible in this module. The 'statusCode' is present under apiResponse
| StatusCode | Summary | Description |
|---|---|---|
| 400 | Face not detected | If a face is not detected in either or both of the images |
| 429 | Rate limit error | When the number of requests per minute has crossed the set limit for your credentials |
| 5xx | Server Error | Please reachout to HyperVerge |
Default Summary Configuration
| Scenario | 'Action' in summary |
|---|---|
| Face Match Failed | Manual Review |
| Face not detected in one or both images | Manual Review |