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 POS, 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/livenessendpoint. 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:
OneShotLiveness thresholds#
By default, two thresholds are used for OneShotLiveness estimation:
Quality threshold#
Quality threshold estimates the input image by the following parameters. The table below has the default threshold values. These values are set to optimal:
| Parameter | Threshold | Value |
|---|---|---|
| Blurriness | blurThreshold |
0.61 |
| Darkness (underexposure) | darknessThreshold |
0.50 |
| Lightness (overexposure) | lightThreshold |
0.57 |
| Illumination | illuminationThreshold |
0.1 |
| Specularity | specularityThreshold |
0.1 |
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.
Number of best shots#
You can specify a number of best shot to be collected for a OneShotLiveness estimation. To do this, use the LunaConfig.bestShotsCount parameter.
The default value is 1.