Skip to content

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:

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.

Number of best shots#

You can specify a number of best shot to be collected for a OneShotLiveness estimation. To do this:

  • In LUNA ID for Android, use the LunaConfig.bestShotsCount parameter.
    The default value is 1.

  • In LUNA ID for iOS, use the LCBestShotConfiguration.numberOfBestShots property.
    The default value is 3.