Overview#
LUNA ID is a set of development tools that includes libraries and neural networks for face recognition and analysis in a mobile app. It also supports OCR (Optical Character Recognition) for document scanning and recognition.
Document scanning and recognition by means of OCR is provided by Regula. Regula is a third-party vendor and using the feature requires a license. For details, please refer to the Regula documentation.
Embedding LUNA ID in your mobile app allows you to use LUNA ID key features, as well as take advantage of LUNA PLATFORM 5 functionality to perform 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. For details, see System and hardware requirements.
The supported programming languages are:
- Kotlin for Android app development
- Swift for iOS app development
Use cases#
Embedding LUNA ID in your mobile app allows you to implement the following use cases:
- Client enrollment
Flow: Registration
The process of creating a new user account, which includes face recognition and, optionally, document recognition. - User authentication
Flow: Verification (1:1)
The process of verifying a user when logging into an app account against the authorized biometry for the specified login. Available after registration.
The use case does not involve the use of OCR. - User recognition
Flow: Identification (1:N)
The process of user identification when a user's face is compared with all the faces in the database to recognize the user among the existing ones and to match the detected face with an existing user account.
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 features#
Security checks#
Virtual camera usage check#
Allows you to detect if your device's camera has been replaced with a virtual one based on a number of signs. The check is only available in LUNA ID for Android. It cannot be enabled or disabled explicitly. For details, see Check for using a virtual camera.
Jailbreak check#
Allows you to find out if your device has been jailbroken. The check is only available in LUNA ID for iOS. It cannot be enabled or disabled explicitly. For details, see Jailbreak check.
Video stream processing and face recognition#
LUNA ID searches for a face in each frame of the video stream recorded by your device's camera. The frame must contain one face to proceed to a series of estimations and get the best shot.
With LUNA ID, you can record:
- Entire video sessions. For details, see Recording a video stream.
- Only those video sessions in which a face was detected in at least one frame. For details, see Recording a video stream only with the face detected.
You can configure the following settings for the recorded video:
- Quality of the recorded video session in LUNA ID for Android
- Timeout before starting a video session recording
- Duration of the recorded video session
Protection against face substitution#
LUNA ID can track the identity of a face detected in a video stream throughout the entire session. This helps avoid security issues and ensure that the detected face belongs to one person. For details, see Tracking a face identity.
You can also implement an event (in LUNA ID for Android) or timeout (in LUNA ID for iOS) which will react to the appearance of a face in the frame for further processing. For details, Fixing a face in the frame.
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 | Yes | There must only be one face in the frame for LUNA ID to continue to perform a series of estimations to get the best shot. |
AGS | Yes | The estimation determines the absolute value of the "quality" of the face, determined by a neural network before descriptor extraction. The estimation result is a floating-point score, which is normalized in the [0..1] range. An image whose score is closer to 1 will be considered the best shot. |
Head pose | Yes | The estimation determines head rotations angles in three-dimensional space: pitch, roll, and yaw. |
Image quality | Yes | The estimation determines an image quality by the following criteria: |
Face detection bounding box size | Yes | The estimation determines that the size of the bounding box with the detected face matches the specified size. The estimation helps to check if the face is far from the camera. |
Frame edges offset | Yes | The estimation determines the distance from the frame edges and is based on the checking the face detection bounding box size estimation. |
Eye state | No | The estimation determines whether the eyes in the image are open, closed and whether the image can be the best shot. |
Eye occlusion | No | The estimation determines whether the eyes in the frame are occluded by glasses and their type (eyeglasses and/or sunglasses) and whether this image can be the best shot. |
Face occlusion | No | The estimation determines whether the face in the frame is occluded by anything and whether this image can be the best shot. |
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 estimation directly on your device. For details, see Performing Offline OneShotLiveness estimation. |
Online OneShotLiveness | Sends images with the detected face to LUNA PLATFORM 5 to perform the estimation on the backend. For details, see Performing Online OneShotLiveness estimation and 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. For details, see About Dynamic Liveness. |
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:
- Verify that the face in an image belongs to a person from a client list (1:N identification).
- Match the detected face with the face that corresponds to the client ID in a global database (1:1 verification).
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 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.