Skip to content

Usage scenario: Complete face recognition cycle#

This section describes a sample LUNA ID usage scenario, which involves interaction with LUNA PLATFORM 5.

This is only an example. You need to change it according to your business logic.

Scenario description#

You want to run a full face recognition cycle using frontend and backend.

Scenario realization stages#

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

  • Getting the best shot with the detected face for best shot and 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).

Prerequisites#

To use this scenario, you need to configure LUNA PLATFORM 5 for it to work with LUNA ID. For details on how LUNA PLATFORM 5 works, see the LUNA PLATFORM 5 documentation.

The preliminary steps are:

1․ Create a LUNA PLATFORM 5 account. For details, see Create account.

2․ Create a list of faces in LUNA PLATFORM 5 for further identification and verification. For details, see Create list.

3․ Add faces to the list by generating a handler event with the link_to_lists_policy enabled.

4․ Create handlers for the following operations:

Scenario realization steps#

The scenario has the following steps:

You should perform some of the scenario realization steps in LUNA PLATFORM 5.

1․ Video stream processing and face detection.

2․ Getting the best shot.

3․ Sending the selected best shot for OneShotLiveness estimation in the backend.

4․ Performing OneShotLiveness estimation at the LUNA PLATFORM 5 /liveness resource. The source image is required for the estimation.

5․ Creating a warp for further face recognition, if the previous steps were successfully passed.

6․ Saving the video stream with the detected face on the mobile device.

7․ Sending the best shot to LUNA PLATFORM 5 for identification according to the existing list.

8․ Performing the identification at the LUNA PLATFORM 5 /handlers/handler_id/events resource. This step creates a temporary attribute that will be used in step 11.

9․ Receiving the results.

10․ Sending a request for verification according to the existing list to LUNA PLATFORM 5.

11․ Performing the verification at the LUNA PLATFORM 5 /verifiers/verifier_id/verification resource.

The resource does not create event objects in LUNA PLATFORM 5 with information about image processing.

12․ Returning the attribute ID.

When implementing the scenario, you can either perform identification (step 8) or verification (step 10), not necessarily perform the both.

The diagram below shows the steps of this scenario:

Scenario realization steps