Skip to content

LUNA PASS API#

The general principle of operation of LUNA PASS API is as follows:

  • a frame comes to the input;
  • LUNA Remote SDK estimates and checks the frame;
  • plugins are executed sequentially if they are enabled:
  • FaceMatcher plugin;
  • VirtualCameraChecker plugin;
  • ActiveLiveness plugin;
  • the aggregated value of Liveness, Deepfake, as well as mouth, eye status and glasses type estimations are calculated;
  • the result of the plugin and check work is analyzed.

By default, all plugins are enabled.

Frame estimation process#

The frame estimation process is the sequential execution of checks. A description of the checks is presented below (Table 5).

Table 5. Checks for frame estimation process

Check

Internal checks

Multiface

whether the face is:

  • the only one in the frame;

  • the largest (main) in the frame;

  • the face closest to the center

Image quality

  • blur;

  • exposure;

  • darkening;

  • glare on the face;

  • contrast

The size and position of the face in the frame

indentation of the face border from the frame border:

  • top;

  • at the bottom;

  • to the right;

  • on the left;

frame size:

  • in width;

  • in height;

the size of the face in the frame:

  • in width;

  • by height

Head position

  • head tilt angle to the right/left (roll);

  • head tilt angle up/down (pitch);

  • head rotation angle right/left (yaw)

Eyes status

  • eyes open;

  • eyes closed

Mouth status

  • the mouth is open;

  • a smile is detected;

  • the mouth is closed

Glasses

  • no glasses;

  • glasses are present;

  • sunglasses

AGS (check the overall image quality metric)

\—

Liveness

  • Liveness estimation;

Deepfake

  • Deepfake estimation

If a frame does not pass any of the checks, then the next frame is analyzed. The user sees the corresponding prompts on the page with LUNA PASS UI.

Enable and configure plugins via Luna Configurator service: server address, port 5070, /dashboard/settings.html.

FaceMatcher plugin#

The plugin allows you to terminate the session if several main faces are detected on two frames within one session. Set the previos_face_similarity parameter = 0.85.

Description of the general working principle of the FaceMatcher plugin:

If the first frame arrives, Facematcher remembers photo of face. If the second frame arrives, Facematcher compares photo of face from the received frame with the photo of the face from the previous frame:

  • if faces on the photos from the two frames are different, then no further checks are carried out;

  • if faces on the photos from the two frames are the same, then the frame is sent for further checks.

VirtualCameraChecker plugin#

The plugin allows you to detect when a user is using a virtual camera instead of a real device camera. Virtual camera detection data is recorded to the logs.

ActiveLiveness plugin#

The plugin allows you to confirm vitality by several frames in which the user interacts with the Service: blinks, turns his head left and right along the Y axis, tilts his head up and down along the X axis. The description of the general working principle of the plugin is presented below (Table 6).

Table 6. Description of the general principle of operation of the ActiveLiveness plugin

Step

Description

1

The administrator selects an arbitrary set of checks*. The number of checks is specified in the settings.

2

If the current frame fails Liveness check, the plugin generates errors. Errors tell what the user should do to pass the verification.

3

If the current frame passes Liveness check, then one or more frames are skipped so that photos with half-open eyes or in the process of turning the head are not counted. The cooldownFramesCount parameter is responsible for the number of skipped frames.

The resulting frame becomes a bestshot.

ActiveLiveness checks#

Blinking

The check begins when both eyes are open, or one eye is open and the acceptOneEyeOpen parameter is enabled. To pass the check, the two frames must then arrive: with eyes closed and again with open ones, or, if the acceptOneEyeOpen parameter is enabled, a frame with one eye closed and a frame with one open.

Head turn

To start checking, the head turn angle must be less than the value of args.yawStartDeg. Next, the two frames must arrive: with a turn angle value greater than args.yawThresholdDeg and with a turn angle value less than args.yawStartDeg.

Head tilt

To start checking, the head tilt angle must be less than the value of args.pitchStartDeg. Next, the two frames must arrive: with a tilt angle value greater than args.pitchThresholdDeg and with a tilt angle value less than args.pitchStartDeg.

For more information about the values of the turn and tilt angles, see configuration parameters of the ActiveLiveness plugin