Skip to main content
Version: 3.16.0

Java Samples

The apk directory includes the following executable files of the demo samples:

  • demo – An example of face tracking and face estimation
  • video_recognition_demo – An example of identification/verification of faces on the video stream from the camera
  • telpo_liveness_video_recognition – an example of face tracking and liveness estimation on Telpo Face Recognition Terminals TPS980

Run the Samples on Android Devices

  1. Download the samples from the latest Face SDK release (See the Assets section).
  2. Copy the samples to your Android device.
  3. Follow the instructions below.

Build the Demo Application from Source Files

  1. Get the trial license.
  2. Copy the 3divi_face_sdk.lic trial license to the license folder.
  3. Open the examples/android folder in Android Studio as an existing project.
  4. Select an application (demo, video_recognition_demo or telpo_liveness_video_recognition), build it and install the resulting application on your device (a smartphone/a tablet or a Telpo terminal).

Android Demo

The sample demonstrates tracking, detection and cropping of faces, detection of anthropometric points and angles, as well as estimation of face quality, age and gender, emotions, and liveness (by processing an RGB image from your camera).

To run the demo, install demo.apk on your device. To install the demo, allow the app to have access to the listed functions.

Permissions requested when you install demo.apk

Tracking results and face information are displayed in a window. The results depending on the selected options are displayed in the upper right corner.

The lower right corner contains a menu with the following sections:

  • choose camera – Selects camera type and image resolution.
  • options – Parameters of the detected face (face rectangle, angles, image quality, liveness, gender and age, anthropometric points, face quality, vector angles, emotions), and the type of face cropping (basic, full frontal, token frontal).
  • quit – Exits the sample.

Running demo.apk

Source code: examples/android/demo

Android Video Recognition

The sample demonstrates tracking, detection and identification/verification of faces from the database on the video stream from the camera.

To run the demo, install video_recognition_demo.apk on your device. To install the demo, let the app have access to the listed functions.

Permissions requested when you install video_recognition_demo.apk

To add a person to the database, click the "new person" button in the app and enter a name.

Tracking results and face information are displayed in a window. In the upper right corner you'll see a tracked face and recognition result (a person from a database and the name).

The lower right corner contains a menu with the following sections:

  • new person – Adds an unidentified person to the database.
  • settings – Selects the type of camera used, image resolution, the method used to detect faces, and the recognition threshold.
  • quit – Exits the sample

Running video_recognition_demo.apk

Source code: examples/android/video_recognition_demo

Telpo Liveness Video Recognition

This project demonstrates face identification and liveness estimation on Telpo Face Recognition Terminals TPS980 with 3D or dual (RGB+IR) cameras. The application also supports human temperature estimation using the built-in temperature sensor of the terminal.

Pre-build the Demo Application

Install and run the pre-built application apk/telpo_liveness_video_recognition.apk for testing. The app contains an embedded license, locked to Application ID and Android OS.

Identify Masked Faces

We provide the new face identification algorithm that is optimized for detection of masked faces and provides better identification quality of masked faces. To set the algorithm for identification of masked faces, follow the steps below:

  1. Open the AuthAcrivity.java file.
  2. Replace the line private final String recognizer_config = "recognizer_latest_v30.xml"; with the line private final String recognizer_config = "method9v30mask_recognizer.xml";.

Source code: examples/android/telpo_liveness_video_recognition