Skip to content

Overview#

LUNA ID is a set of development tools for face recognition and analysis in mobile applications. It includes libraries and neural networks that enable advanced functionalities such as face detection and recognition, image quality estimations, and liveness estimations to prevent spoofing attacks. Additionally, LUNA ID supports OCR (Optical Character Recognition) for document scanning and recognition.

Document scanning and recognition via OCR are powered by Regula, a third-party vendor. Using this feature requires a valid license. For more information, please refer to the Regula documentation.

By integrating LUNA ID into your mobile app, you can use its key features and integrate with LUNA PLATFORM 5 for enhanced capabilities, including OneShotLiveness estimation and descriptor matching. For details, see Interaction of LUNA ID with LUNA PLATFORM 5.

Supported operating systems and programming languages#

LUNA ID is compatible with the Android and iOS operating systems.

The supported programming languages are:

  • Kotlin for Android app development
  • Swift for iOS app development

For details, see System and hardware requirements.

Use cases#

Embedding LUNA ID in your mobile app allows you to implement the following use cases:

  • Client enrollment
    Flow: Registration
    Process: Creating a new user account with face recognition and optional document recognition.
  • User authentication
    Flow: Verification (1:1)
    Process: Verifying a user during login against authorized biometric data. The use case is available after registration and does not involve the use of OCR.
  • User recognition
    Flow: Identification (1:N)
    Process: Comparing a detected face against all faces in a database to recognize the user. You can use OCR in this use case.

The diagram below shows these processes, the LUNA ID key features required to implement them, and the sequence in which we recommend using them. Depending on your business logic, you may or may not use certain LUNA ID features.

LUNA ID use cases and features

LUNA ID features#

Security checks#

  • Virtual camera usage check
    Detects if the device's camera has been replaced with a virtual one. The check is only available in LUNA ID for Android.
  • Jailbreak check
    Determines if the device has been jailbroken.

Video stream processing and face recognition#

LUNA ID analyzes each frame of the video stream captured by your device's camera to detect faces. To proceed with further estimations and get the best shot, each frame must contain exactly one face.

Video recording options:

You can customize various settings for the recorded video:

Setting Platform
Video stream quality
Timeout before starting recording
Video stream duration
Custom frame resolution
Autofocus

Protection against face substitution#

LUNA ID provides robust mechanisms to prevent face substitution by tracking the identity of a detected face throughout the entire video session. This ensures that the system consistently identifies the same person, mitigating potential security risks and guaranteeing the authenticity of the detected face.

Key features:

  • Face identity tracking
    Allows you to continuously monitor the detected face in the video stream to confirm it belongs to a single individual.
  • Event handling (in LUNA ID for Android)
    Allows you to implement an event listener that triggers when a face appears in the frame. This allows for immediate processing or additional checks once the face is detected.
  • Timeout configuration (in LUNA ID for iOS)
    Allow you to set a timeout to react to the appearance of a face in the frame. This ensures timely processing and enhances the overall security of the recognition process.

Getting the best shot#

To get the best shot, LUNA ID performs a number of estimations.

Estimation Required Description
Number of faces in the frame Ensures there is only one face in the frame.
AGS Evaluates face quality using a normalized score (0–1). Higher scores indicate better quality.
Head pose Measures head rotation angles (pitch, roll, yaw) in 3D space.
Image quality Assesses criteria like blurriness, exposure, illumination, and specularity.
Face detection bounding box size Verifies the size of the detected face relative to the frame.
Frame edges offset Checks the distance of the face from the frame edges.
Eye state Detects whether eyes are open or closed.
Glasses Identifies if the eyes are occluded by glasses.
Face occlusion Determines is the lower part of the face is occluded by an object.
Medical mask Determines if the face is covered by a medical mask.
Mouth Checks if the mouth is occluded by an object.

Protection against spoofing attacks#

LUNA ID can perform a number of estimations to determine whether the person in the frame is real or a fraudster using a fake ID (a printed photo of a face, a video, or a 3D mask).

Estimation Description
Offline OneShotLiveness Allows you to perform the OneShotLiveness estimation directly on your device.
Online OneShotLiveness Sends images with the detected face to LUNA PLATFORM 5 to perform the estimation on the backend. For details, see Interaction of LUNA ID with LUNA PLATFORM 5.
Dynamic Liveness Allows you to determine whether a person is alive by interacting with the camera and is performed on your device without any backend processing.

Identification and verification#

With LUNA ID, you can send source images to LUNA PLATFORM 5 for descriptor matching on the backend. It allows you to perform the following tasks:

  • 1:N identification
    Verifies that the face in an image belongs to a person from a client list.
  • 1:1 verification
    Matches the detected face with the face that corresponds to the client ID in a global database.

For details, see Interaction of LUNA ID with LUNA PLATFORM 5.

Usage scenarios#

This section describes sample LUNA ID usage scenarios.

These are only examples. You need to change them according to your business logic.

Scenario 1: Getting images#

Scenario description#

You want to get a photo with a person's face, and then implement your own business logic for processing the image.

Scenario realization stages#

Applying this scenario in your mobile app proceeds in stages:

  • Getting the best shot with the detected face by performing best shot estimations.
  • Getting a warp or source image with the face on a mobile device to transfer it to an external system.

Scenario realization steps#

The scenario has the following steps:

1․ Video stream processing and face detection.

2․ Getting the best shot based on standard best shot estimations. In some cases, the best shot is an image that also successfully passed OneShotLiveness estimation.

3․ Getting a warp.

4․ Saving the warp on the device. You can then send it to a middleware for further processing.

The diagram below shows the steps of this scenario:

Scenario realization steps

Scenario 2: Complete face recognition cycle#

Scenario description#

You want to run a full face recognition cycle using frontend and backend. This scenarios involves interaction of LUNA ID with LUNA PLATFORM 5.

Scenario realization stages#

Applying a full face recognition cycle in your mobile app proceeds in stages:

  • Getting the best shot with the detected face and performing the Online OneShotLiveness estimation.
  • Identifying that the face in the image belongs to a person from a client list (1:N identification).
  • Matching the detected face with the face corresponding to the client ID in a global database (1:1 verification).

Scenario realization steps#

For details on the scenario implementation and scenario realization steps, see Usage scenario.