Visage Tracker Demo sample project

This sample application demonstrates facial features tracking on multiple faces from camera or image file and liveness verification. Currently, tracking is limited to 4 faces, although this can be modified. Full source code of this sample is located in Samples/Android/VisageTrackerDemo.

The application needs to be rebuilt with license key in order to work properly. More information on how to obtain license key and include it in the application can be found in Licensing section of the documentation.

Using the sample application

To try the Visage Tracker Demo application, you need to transfer and install application on your Android device. First, connect your phone as a storage device and transfer the apk file onto SD card. Then, use file explorer on the Android device to locate and install the sample application. If you are not able to install the application, the following steps might be required (depending on your Android version):

After the installation is finished you can run the application on the device.
The sample application consists of a menu where you can choose to track from an Image or from Camera or perform liveness verification.
In case of image tracking you will be prompted to choose the image.
Visage Technologies logo

Figure 1.1: Application started

In case of camera tracking, tracking starts automatically when the face is detected in the camera image.

Visage Technologies logo

Figure 1.2: Application is tracking

In case of liveness you will be prompted to perform a set of facial motions in order to verify liveness.

Building the sample project

The VisageTrackerDemo sample project is located in the VisageTrackerDemo subfolder of the visage| SDK for Android folder.

Prerequisites for building and running the sample project are:

Sample applications were built and tested using:

Project is opened by choosing "Open an existing Android Studio project" after running Android Studio. Sample is located in "visageSDK-Android/Samples/Android". After that the following steps are necessary:

  1. To compile the native code, go to Build -> Make Project
  2. Now the application can be built by pressing the run button and choosing your Android device

Implementation overview

The visage|SDK API is written in C++. Since development on Android is done in Java, this sample uses the AndroidWrapper C++ class that exposes Java methods for using tracking and liveness API, while the implementation of those methods is done in C++. The AndroidWrapper C++ class connects with GUI and implements actions that call start and stop the tracker and starts liveness verification.
The specific classes and methods that demonstrate visage|SDK are: