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
- Download the samples from the latest Face SDK release (See the Assets section).
- Copy the samples to your Android device.
- Follow the instructions below.
Build the demo application from source files
- Get the trial license.
- Copy the
3divi_face_sdk.lic
trial license 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 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:
- 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