Face Capture and Quality Assessment
During an ID&V process, an end-user may be asked to provide a photograph to support their claim of identity. This captured face image can be accessed for quality and liveness prior to being accepted by TrustX. The face quality assessment is performed using the Daon Face Quality algorithm. The Face liveness algorithm determines if a face is real, that is to say, it is captured from a live person and at the time when the capture session is initiated.
This document will describe a common implementation of face capture that performs face quality and face liveness checks using the latest activities provided by TrustX. The 'Face Capture Example' Process Definition template will be used as an example implementation.
Process Definition Setup
To create a new Process Definition based on the 'Face Capture Example' template, follow the steps below.
- Log in to the Backoffice application and select Process Definitions > New Process Definition.
- From the pop-up that appears, select the 'Face capture example' template.

- This Process Definition provides a standard face capture flow. The face image will be captured via mobile device, then face quality and liveness are tested against the image.

Face Capture

The face capture process is performed by the 'Capture Face Image' activity. When implemented in a Process Definition, this activity will prompt the end-user to capture their face image using the TrustWeb application.
This activity includes the following configurable input parameters:
Parameter | Description | Type | Default |
---|---|---|---|
Camera Height | The height of the camera set during capture. | INTEGER | ${720} |
Camera Width | The width of the camera set during capture. | INTEGER | ${1280} |
Face Image Format | The format of the image to be captured. | STRING | jpeg |
Face Key | The identifier of the Face. | STRING | face1 |
List of Screens | The list of screens to be presented to the user during the capture process. Possible values include: instructions, capture, and preview. | LIST_STRINGS | ["instructions", "capture", "preview"], |
Starting Component ID | The name of the capture step to be sent to the UI | STRING | face-capture |
Timeout in Seconds | Camera timeout in seconds. | INTEGER | ${60} |
UI Component ID | The name of the screen used in the capture UI. | STRING | instructions |
When the end-user reaches this activity during the TrustWeb process, they will be presented with the instructions screen below. After selecting the 'Open camera' button, the end-user will be requested to capture a face image.

This screen is customizable using the Themes feature. See the Themes Guide for more information.
Capture with Back Camera
It is also possible to automatically show the back camera first when completing face capture. The 'Capture Face Image v2.1 - Back camera' will start capture process using the back camera. If the device supports multiple back cameras, a switch camera button will appear that enables users to switch between each camera.

This activity supports the following input parameters:
Parameter | Description | Type | Default |
---|---|---|---|
Advanced configuration | A JSON formatted block where users can provide additional configurations for face capture. | String | {"lastPassedFrameDelayInMilliseconds":150} |
Camera Height | The height of the camera set during capture. | INTEGER | ${720} |
Camera Width | The width of the camera set during capture. | INTEGER | ${1280} |
Face Key | The identifier of the Face. | STRING | face1 |
List of Screens | The list of screens to be presented to the user during the capture process. Possible values include: instructions, capture, and preview. | LIST_STRINGS | ["instructions", "capture"], |
Starting Component ID | The name of the capture step to be sent to the UI | STRING | face-capture-v2 |
Timeout in Seconds | Camera timeout in seconds. | INTEGER | ${60} |
UI Component ID | The name of the screen used in the capture UI. | STRING | instructions |
Use Native Capture | If enabled, face capture will be handled natively. | BOOLEAN | ${false} |
Face Quality Assessment

The face quality assessment will determine the quality of a captured face image using the 'Face Quality Assessment' activity.
Error Boundary Events
Face quality assessment provides one error boundary event.
- Failed face quality - Triggered when the captured face image fails the quality assessment.
Face Liveness Assessment

Face liveness is performed using the the 'Face Liveness Assessment' activity. This activity provides the following configurable input parameters:
Parameter | Description | Type | Default |
---|---|---|---|
Error navigation screen | The screen to navigate after an error occurs. | STRING | preview |
Exception on Max Attempts Exceeded | If the maxAttempts is exceeded, should exceedFailedLivenessCount exception be thrown. | BOOLEAN | ${true} |
Face Key | The identifier of the face. | STRING | face1 |
Liveness Threshold | The threshold value which determines if a face is considered to be a live face. | DOUBLE | ${0.5} |
Max Attempts | The number of failed attempts of face liveness before the exceedFailedLivenessCount exception is thrown. | INTEGER | ${3} |
Pipeline | The name of the pipeline. | STRING | pad-r-1 |
Error Boundary Events
'Face Liveness Assessment v1.47' provides two error boundary events.
- Failed face liveness - Triggered when the captured face image face the liveness check. A failed liveness check will add +1 to the max attempt counter.
- Exceed max attempts count - Triggered when the number of retry attempts exceeds the 'Max Attempts' input parameter value.
The 'Face Liveness Assessment v1.49' activity supports three error boundary events that behave differently from the boundary events of v1.47.
- Failed liveness quality - Triggered when the captured face image fails the liveness quality threshold. This error does not increase the max attempts counter.
- Failed face liveness - Triggered when the captured face image face the liveness check. A failed liveness check will add +1 to the max attempt counter.
- Exceed max attempts count - Triggered when the number of retry attempts exceeds the 'Max Attempts' input parameter value.
Viewing Results
Face quality and liveness results can be viewed in the Backoffice application or via the TrustX API.
Viewing Results in the Backoffice
The results of a Process Instance can be viewed from the Backoffice application. From the Backoffice application, follow the steps outlined below.
- Select Process Instances from the left vertical navigation bar.
- The Process Instances page provides various search options to find the Process Instance of choice.

- From the list of search results, select the magnifying glass to view the Process Instance page.

- Results can be found under the 'Verification' section. A further breakdown of results can be found under the 'Checks' section.

Viewing Results via TrustX API
Check results for face quality and liveness can be retrieved from the TrustX API. This section will describe which tenant permissions are required and requests required.
Permissions: TNT#{tenantid}#UserDataServer:getChecksByKey
Request:
GET https://{{tenant}}.{{region}}.trustx.com/api/userdata-server/processDefinitions/{processDefnId}/processInstances/{processInstanceId}/userdata/checks
Content-Type: application/json
X-API-Key: {{apiKey}}
{}
Response:
{
"faceQuality": {
"id": "faceQuality",
"nested": {
"face1": {
"id": "face1",
"outcome": "PASS",
"metaData": {
"result": "PASS",
"feedback": "No feedback",
"metrics": {
"EyesOpenConfidence": 1.0,
"UniformLightingConfidence": 0.8,
"FrontalPosePass": true,
"FaceFoundPass": true,
"PoseAngleRoll": 1,
"Name": "SnapIn-DaonFaceV5",
"FaceCntrPositionY": 747,
"FaceCntrPositionX": 340,
"SharpnessPass": true,
"FaceBoxUpperLeftCornerY": 581,
"Version": "1.1.0.13",
"FaceBoxUpperLeftCornerX": 173,
"OnlyOneFaceConfidence": 1.0,
"InterEyesDistancePass": true,
"ExposurePass": true,
"FaceBoxLowerRightCornerX": 507,
"RightEyePositionX": 424,
"Age": 30,
"FaceBoxLowerRightCornerY": 912,
"RightEyePositionY": 675,
"GrayscaleDensityPass": true,
"LeftEyePositionY": 673,
"PoseAngleRollPass": true,
"LeftEyePositionX": 277,
"FrontalPoseConfidence": 0.9,
"EyesOpenPass": true,
"Exposure": 57,
"EyesFoundConfidence": 0.94454,
"UniformLightingPass": true,
"Sharpness": 67,
"GrayscaleDensity": 204,
"InterEyesDistance": 146,
"GlobalFaceQualityScore": 0.916124,
"GlobalFaceQualityPass": true,
"OnlyOneFacePass": true,
"FaceFoundConfidence": 1.0,
"EyesFoundPass": true
}
}
}
}
},
"faceLiveness": {
"id": "faceLiveness",
"nested": {
"face1": {
"id": "face1",
"outcome": "PASS",
"metaData": {
"valid": true,
"faceLivenessResult": {
"score": 2.6163397,
"quality": 0.97077256,
"probability": 0.9319058
},
"faceCaptureFailure": false,
"service": "/api/idlive-face-v1-42/check_liveness"
}
}
}
}
}
The example response above provides all face quality and liveness checks performed during the Process Instance.
Further Reading
- Age Estimation Guide - Perform an age estimation and verification check against a captured face image.
- (Link Removed) - Perform a document to face match using Daon Face v7.
- Injection Attack Detection - Perform injection attack detection on a captured face image using xFace.