About OneShotLiveness estimation#
OneShotLiveness is an algorithm for determining whether a person in one or more images is "real" or a fraudster using a fake ID (printed face photo, video, paper, or 3D mask).
OneShotLiveness is used as a pre-check before performing face detection.
OneShotLiveness estimation types#
With LUNA ID, you can perform the following types of OneShotLiveness estimation:
- Online OneShotLiveness estimation
To perform Online OneShotLiveness estimation, LUNA ID sends a request to the LUNA PLATFORM 5/liveness
endpoint. For more details about LUNA ID and LUNA PLATFORM 5 interaction, see the Interaction of LUNA ID with LUNA PLATFORM 5. - Offline OneShotLiveness estimation
To perform Offline OneShotLiveness estimation, you do not need to send requests to LUNA PLATFORM 5. You can perform the estimation directly on your device.
Image requirements#
An image that LUNA ID takes as input must be a source image and meet the following requirements:
Parameters | Requirements |
---|---|
Minimum resolution for mobile devices | 720x960 pixels |
Maximum resolution for mobile devices | 1080x1920 pixels |
Compression | No |
Image warping | No |
Image cropping | No |
Effects overlay | No |
Mask | No |
Number of faces in the frame | 1 |
Face detection bounding box size | More than 200 pixels |
Frame edges offset | More than 10 pixels |
Head pose | -20 to +20 degrees for head pitch, yaw, and roll |
Image quality | The face in the frame should not be overexposed, underexposed, or blurred. |
OneShotLiveness thresholds#
By default, two thresholds are used for OneShotLiveness estimation:
Quality threshold#
Quality threshold estimates the input image by the following parameters:
- Lightness (overexposure)
- Darkness (underexposure)
- Blurriness
- Illumination
- Specularity
The table below has the default threshold values. These values are set to optimal:
Threshold | Value |
---|---|
blurThreshold | 0.61 |
darknessThreshold | 0.50 |
lightThreshold | 0.57 |
illuminationThreshold | 0.1 |
specularityThreshold | 0.1 |
For details on image quality estimation, see Image Quality Estimation and Quality estimator settings.
Liveness threshold#
The LunaConfig.livenessQuality
parameter specifies the threshold lower which the system will consider the result as a presentation attack.
For images received from mobile devices, the default liveness threshold value is 0.5. For details, see Liveness threshold.