LUNA PASS API#
The general principle of operation of LUNA PASS API is as follows:
- a frame comes to the input;
- LUNA 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 4).
Table 4. Checks for frame estimation process
Check |
Internal checks |
---|---|
Multiface |
whether the face is:
|
Image quality |
|
The size and position of the face in the frame |
indentation of the face border from the frame border:
frame size:
the size of the face in the frame:
|
Head position |
|
Eyes status |
|
Mouth status |
|
Glasses |
|
AGS (check the overall image quality metric) |
\— |
Liveness |
|
Deepfake |
|
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.
FaceMatcher plugin#
The FaceMatcher plugin is enabled in the config.toml file. For this, set the parameter disallowMultipleFacesInSession = 1 in the LIVENESS configuration parameters. It allows you to terminate the session if several main faces are detected on two frames within one session.
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#
VirtualCameraChecker plugin is enabled in the config.toml file. It 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 ActiveLiveness plugin is in the config.toml file. It 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 5).
Table 5. 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 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
Results processing#
The general working principle of LUNA PASS API is shown in the diagram (Figure 9). The description of the general working principle is presented below (Table 6).
Table 6. Description of the general principle of operation of LUNA PASS API
Step |
Description |
---|---|
0 |
The LUNA PASS API gets the frame |
1 |
LUNA PASS API evaluates the frame using the LUNA SDK and compares the resulting values with thresholds. More details in the "Frame estimation process" |
2 |
If the FaceMatcher plugin is enabled, processing is performed according to the process described above |
3 |
If the VirtualCameraChecker plugin is enabled, then it checks whether the user is using a virtual camera instead of the real device camera |
4 |
If the ActiveLiveness plugin is enabled, processing is performed according to the process described above |
5 |
After performing actions in the specified plugins, the LUNA PASS API processes the obtained results. LUNA PASS API checks if the received frame is the first one. Depending on this check, the following steps are performed:
|
6 |
If the received frame is not the first, then the face from the current is compared with the face from the first frame:
|
7 |
Multiple principals detected within the same session, the session is closed without a successful frame. |
8 |
LUNA PASS API checks if the camera is real. Depending on the results of this check, the following steps are performed:
|
9 |
The user is detected using a virtual camera instead of a real device camera, the session is closed without a successful frame. |
10 |
LUNA PASS API checks: the number of frames that reached the Liveness estimation is greater than or equal to the value
Depending on this check, further analysis is divided into two parts:
|
If at step 10 the number of frames that reached the Liveness estimation is less than allowed, the following steps are performed: |
|
11 |
LUNA PASS API checks if the number of received frames is greater than or equal to the value
|
12 |
LUNA PASS API checks the values:
If the values of the obtained aggregated values are higher than or equal to the threshold, then go to the next step |
13 |
LUNA PASS API checks if the ActiveLiveness plugin is enabled |
14 |
If the ActiveLiveness plugin is enabled, LUNA PASS API performs a check on the result of the ActiveLiveness plugin. The session continues until the frame passes active Liveness |
15 |
When the ActiveLiveness plugin results check is passed, the LUNA PASS API sends this frame to the LUNA PASS UI as a successful frame |
16 |
If the ActiveLiveness plugin is disabled, the LUNA PASS API sends this frame to the LUNA PASS UI as a successful frame |
If at step 10 the number of frames that reached the Liveness estimation is greater or equal to the allowable, the following steps are performed: |
|
17 |
The LUNA PASS API checks if the ActiveLiveness plugin is enabled |
18 |
If the ActiveLiveness plugin is enabled, LUNA PASS API performs a check on the result of the ActiveLiveness plugin The session continues until the frame passes active Liveness |
19 |
When the ActiveLiveness plugin results check is passed, the LUNA PASS API sends this frame to the LUNA PASS UI as a successful frame |
20 |
If the ActiveLiveness plugin is disabled, the LUNA PASS API sends this frame to the LUNA PASS UI as a successful frame |
21 |
|
22 |
The current session is closed without a successful frame |