Java Demo Programs
The apk directory contains the following executable files of the demo programs:
- 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
Running the Samples on Android Devices
- Download the samples from the latest Face SDK release (see the Assets section).
- Copy the samples to your Android device.
- Follow the instructions below.
Building the Demo Application from Source Files
- Get the trial license.
- Copy the trial license
3divi_face_sdk.lic
to thelicense
folder. - Open the
examples/android
folder in Android Studio as an existing project. - 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 program 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, you should allow the app to have access to the listed functions.
Permissions requested when installing 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.
In the lower right corner there is a menu with the following sections:
- choose camera – select 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), as well as the type of face cropping (basic, full frontal, token frontal)
- quit – exit the program
Running demo.apk
Source code: examples/android/demo
Android Video Recognition
The program 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, you should allow the app to have access to the listed functions.
Permissions requested when installing video_recognition_demo.apk
To add a person to the database, in the app click on the "new person" button and enter a name.
Tracking results and face information are displayed in a window. In the upper right corner you can see a tracked face and recognition result (a person from a database and his/her name).
In the lower right corner there is a menu with the following sections:
- new person – add an unidentified person to the database
- settings – select the type of camera used, image resolution, the method used to detect faces, and the recognition threshold
- quit – exit the program
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-building the Demo Application
Install and run the prebuilt application apk/telpo_liveness_video_recognition.apk
for testing. The app contains an embedded license locked to Application ID and Android OS.
Identifying 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. Follow the steps below to set the algorithm for identification of masked faces:
- Open the
AuthAcrivity.java
file. - Replace the line
private final String recognizer_config = "recognizer_latest_v30.xml";
with the lineprivate final String recognizer_config = "method9v30mask_recognizer.xml";
.
Source code: examples/android/telpo_liveness_video_recognition