Java Demo Programs
To run the samples for 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.
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 using the
pbio.VideoWorker
object - telpo_3dliveness_video_recognition – an example of face tracking and liveness estimation on Telpo Face Recognition Terminals TPS980
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 recognition of faces from the database.
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).
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.
Pre-building the Demo Application
Install and run the prebuilt application apk/telpo_3dliveness_video_recognition.apk
for testing. The app contains an embedded license locked to Application ID and Android OS.
Building the Demo Application from Source Files
- Get the trial license.
- Copy the trial license
3divi_face_sdk.lic
toexamples/android/telpo_3dliveness_video_recognition/src/main/assets/license
. - Open the folder
telpo-android
in Android Studio as an existing project. - Build the project and install the generated appcon your Telpo terminal.
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 = "method9v30_recognizer.xml";
with the lineprivate final String recognizer_config = "method9v30mask_recognizer.xml";
.
Source code: examples/android/telpo_3dliveness_video_recognition