GitPedia

FaceRecognition Android

Face Recognition, Face Liveness Detection, Face Anti-Spoofing, Face Detection, Face Landmarks, Face Compare, Face Matching, Face Pose, Face Expression, Face Attributes, Face Templates Extraction, Face Landmarks

From Faceplugin-ltd·Updated June 15, 2026·View on GitHub·

Explore `face recognition SDK` from [Faceplugin](https://faceplugin.com/) Top-ranked on NIST FRVT , coupled with an advanced `iBeta level 2 liveness detection` engine that effectively safeguards against **printed photos, video replay, 3D masks, and deepfake threats**, ensuring top-tier security. This is `on-premise face recognition SDK` which means everything is processed in your phone and **NO** data leaves the device. The project is written primarily in Java, first published in 2024. Key topics include: age-estimation, anti-spoofing, biometric-authentication, deep-learning, ekyc.

<div align="center"> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-Javascript/assets/160750757/657130a9-50f2-486d-b6d5-b78bcec5e6e2.png" width=200/> </div>

Hugging Face - Here <span> <img src="https://github.com/user-attachments/assets/303cda2b-a195-42c5-b481-6b2b796d2910" style="margin: 4px; width: 36px; height: 20px"> <span/>

Documentation- Here

Face Recognition SDK Android with 3D Passive Liveness Detection - Fully On Premise

Overview

Explore face recognition SDK from Faceplugin Top-ranked on NIST FRVT , coupled with an advanced iBeta level 2 liveness detection engine that effectively safeguards against printed photos, video replay, 3D masks, and deepfake threats, ensuring top-tier security.
<br>This is on-premise face recognition SDK which means everything is processed in your phone and NO data leaves the device.
<br></br>

Try this APP on Google Play

<a href="https://play.google.com/store/apps/details?id=ai.faceplugin.recognition" target="_blank"> <img alt="" src="https://user-images.githubusercontent.com/125717930/230804673-17c99e7d-6a21-4a64-8b9e-a465142da148.png" height=80/> </a> <br></br> <div align="left"> <img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome Badge"/> <img src="https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99" alt="Star Badge"/> <img src="https://img.shields.io/github/issues/genderev/assassin" alt="issue"/> <img src="https://img.shields.io/github/issues-pr/genderev/assassin" alt="pr"/> </div>

Screenshots

<div align="left"> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Android/assets/160750757/5665b865-23fc-4c19-9663-5093a975fc66" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Android/assets/160750757/250ac71d-0844-4c26-b4b6-8afa6952f60e" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android/assets/160750757/92f4113e-16b0-43e2-b6af-d5fa3c4e56c9" width=200/> <img alt="" src="https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android/assets/160750757/fc5f985c-cf40-41d7-9ff9-a5aab5898a33" width=200/> </div>

On the Youtube

<div align="center"> <a href="http://www.youtube.com/watch?feature=player_embedded&v=qVtdkwtGtqs" target="_blank"> <img src="http://img.youtube.com/vi/qVtdkwtGtqs/maxresdefault.jpg" alt="Watch the video" width="960" height="520" border="10" /> </a> </div>

Install License

The code below shows how to use the license: https://github.com/Faceplugin-ltd/FaceRecognition-Android/blob/370ecadae564788eaa84f288e342da742fde0c1a/app/src/main/java/com/faceplugin/facerecognition/MainActivity.kt#L30-L45

Please contact us to get the license.

Documentation

<details>

<a name="setup"><h3>Setup</h3></a>
Copy the SDK (libfacesdk folder) to the root folder in your project.

Add SDK to the project in settings.gradle

rootProject.name = "YourProjectName"
include ':app'
include ':libfacesdk'

Add dependency to your build.gradle

implementation project(path: ':libfacesdk')

<a name="api"><h3>APIs</h3></a>

<h4> Activate SDK using license </h4>
java
public static native int setActivation(java.lang.String s);
<h4> Init model for face recognition and liveness detection </h4>
java
public static native int init(AssetManager var0);
<h4> Convert camera frame in YUV to Bitmap </h4>
java
public static native Bitmap yuv2Bitmap(byte[] var0, int var1, int var2, int var3);
<h4> Run face recognition and liveness detection </h4>
java
public static native List<FaceBox> faceDetection(Bitmap var0, FaceDetectionParam var1);
<h4> Extract feature vector for the enrollment </h4>
java
public static native byte[] templateExtraction(Bitmap var0, FaceBox var1);
<h4> Calculate cosine similarity for the matching </h4>
java
public static native float similarityCalculation(byte[] var0, byte[] var1);

<a name="sdk-code"><h3>SDK Codes</h3></a>

CodeStatus
0Activate SDK successfully
-1Invalid License Key
-2Invalid AppID
-3Expired License Key
-4Activation Failed
-5SDK Failed

<a name="classes"><h3>Classes</h3></a>

<h4>FaceResult</h4>
TypeNameDescription
RectrectBounding box for face
intlivenessLiveness status: 0 for spoof, 1 for real, less than 0 for unknown
intgenderGender classification result
intmaskMask presence: 0 for no mask, 1 for mask
intageAge estimation result
floatyawYaw angle: -45 to 45 degrees
floatrollRoll angle: -45 to 45 degrees
floatpitchPitch angle: -45 to 45 degrees
byte[]feature2056-byte facial feature data
byte[]faceDataEncrypted facial data
intorientFace orientation: 1 for no rotation, 2 for 90° rotation, 3 for 270° rotation, 4 for 180° rotation
intfaceIdFace ID in the tracking face mode
java
public class FaceResult { public Rect rect; public int liveness; public int gender; public int mask; public int age; public float yaw; public float roll; public float pitch; public byte[] feature; public byte[] faceData; public int orient; public int faceId; public FaceResult() { } }
</details>

Here's our official document

List of our Products

Contact

<div align="left"> <a target="_blank" href="mailto:info@faceplugin.com"><img src="https://img.shields.io/badge/email-info@faceplugin.com-blue.svg?logo=gmail " alt="faceplugin.com"></a>&emsp; <a target="_blank" href="https://t.me/faceplugin"><img src="https://img.shields.io/badge/telegram-@faceplugin-blue.svg?logo=telegram " alt="faceplugin.com"></a>&emsp; <a target="_blank" href="https://wa.me/+19382025720"><img src="https://img.shields.io/badge/whatsapp-faceplugin-blue.svg?logo=whatsapp " alt="faceplugin.com"></a> </div>

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from Faceplugin-ltd/FaceRecognition-Android via the GitHub API.Last fetched: 6/19/2026