FaceLivenessDetection Android Save

This is a demo project for 3D passive face liveness detection, which is an anti-spoofing technology.

Project README

👏 Product List


👏 We have published the Face Liveness Detection, Face Recognition SDK and ID Card Recognition SDK for the server.



The demo project showcases real-time Face Liveness Detection technology.

The demo is integrated with KBY-AI's Basic Face Mobile SDK.

Basic Standard Premium
Face Detection Face Detection Face Detection
Face Liveness Detection Face Liveness Detection Face Liveness Detection
Pose Estimation Pose Estimation Pose Estimation
Face Recognition Face Recognition
68 points Face Landmark Detection
Face Quality Calculation
Face Occlusion Detection
Eye Closure Detection
Age, Gender Estimation

Face Liveness Detection - Android(Basic SDK)

Face Liveness Detection - iOS(Basic SDK)

Face Recognition - Android(Standard SDK)

Face Recognition - iOS(Standard SDK)

Face Recognition - Flutter(Standard SDK)

Face Recognition - React-Native(Standard SDK)

Face Attribute - Android(Premium SDK)

Face Attribute - iOS(Premium SDK)


Try the APK

Google Play

Google Drive


SDK License

This project uses kby-ai's liveness detection SDK. The SDK requires a license per application ID.

Email: [email protected]

Telegram: @kbyai

WhatsApp: +19092802609

Skype: live:.cid.66e2522354b1049b

About SDK

Set up

  1. Copy the SDK (libfacesdk folder) to the root folder of your project.

  2. Add SDK to the project in settings.gradle

include ':libfacesdk'
  1. Add dependency to your build.gradle
implementation project(path: ':libfacesdk')

Initializing an SDK

  • Step One

To begin, you need to activate the SDK using the license that you have received.


If activation is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

  • Step Two

After activation, call the SDK's initialization function.


If initialization is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

Face Detection and Liveness Detection

The FaceSDK offers a single function for detecting face and liveness detection, which can be used as follows:


This function takes a single parameter, which is a bitmap object. The return value of the function is a list of FaceBox objects. Each FaceBox object contains the detected face rectangle, liveness score, and facial angles such as yaw, roll, and pitch.

Yuv to Bitmap

The SDK provides a function called yuv2Bitmap, which converts a yuv frame to a bitmap. Since camera frames are typically in yuv format, this function is necessary to convert them to bitmaps. The usage of this function is as follows:

Bitmap bitmap = FaceSDK.yuv2Bitmap(nv21, image.getWidth(), image.getHeight(), 7);

The first parameter is an nv21 byte array containing the yuv data.

The second parameter is the width of the yuv frame, and the third parameter is its height.

The fourth parameter is the conversion mode, which is determined by the camera orientation.

To determine the appropriate conversion mode, the following method can be used:

 1        2       3      4         5            6           7          8

 888888  888888      88  88      8888888888  88                  88  8888888888
 88          88      88  88      88  88      88  88          88  88      88  88
 8888      8888    8888  8888    88          8888888888  8888888888          88
 88          88      88  88
 88          88  888888  888888
Open Source Agenda is not affiliated with "FaceLivenessDetection Android" Project. README Source: kby-ai/FaceLivenessDetection-Android

Open Source Agenda Badge

Open Source Agenda Rating