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.

To perform the 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 section of LUNA ID overview.

Image requirements#

An image that LUNA ID takes as input must be a source image and meet the following requirements:

Parameters Requirements
File format PNG, RGB color model
Resolution FullHD
Minimum acceptable dimensions: 720x960 pixels
Maximum acceptable dimensions: 1080x1920 pixels
Compression No
Image cropping No
Effects overlay 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#

Liveness threshold is 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.