Skip to content

Repository files navigation

Hugging Face - Here

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.
This is on-premise face recognition SDK which means everything is processed in your phone and NO data leaves the device.

Try this APP on Google Play



Awesome BadgeStar Badgeissuepr

Screenshots

On the Youtube

Watch the video

Install License

The code below shows how to use the license:

textWarning = findViewById<TextView>(R.id.textWarning)
var ret =FaceSDK.setActivation(
"BHXyX7G02RB3wpAm3E3+87VOyDelFmVDeobU0eg5pOe6W9gX/KM1csCi18Dw9bPrq96V5OCtPz/z\n"+
"fu64b+PDL4tPvoRics/+JF8iNakrqSOpF6jfYig5SPZAov6ufNoxdd01MpuYLZdjpLAfxr2DWho6\n"+
"kiTH8vV/3IGT1ZjsLfmtllDeXE80oan4GuSYsGVj5YxwAeyUEKcAT6+wMipYUK0HXHVnKkAZp6rm\n"+
"owBRpquxBUIlCMcbzYjIu0mu/lMy5ZIPklaLWflaG8rMIxJgFhOQMob4dV1cJcvNUdfv4PZwnUh2\n"+
"1vz8s5Apn9KTsX2zPyJdF280zbsOTgljVvXe3Q=="
)
if (ret ==FaceSDK.SDK_SUCCESS) {
ret =FaceSDK.init(assets)
}
if (ret !=FaceSDK.SDK_SUCCESS) {

Please contact us to get the license.

Documentation

Details

Setup

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')

APIs

Activate SDK using license

publicstaticnativeintsetActivation(java.lang.Strings);

Init model for face recognition and liveness detection

publicstaticnativeintinit(AssetManagervar0);

Convert camera frame in YUV to Bitmap

publicstaticnativeBitmapyuv2Bitmap(byte[] var0, intvar1, intvar2, intvar3);

Run face recognition and liveness detection

publicstaticnativeList<FaceBox> faceDetection(Bitmapvar0, FaceDetectionParamvar1);

Extract feature vector for the enrollment

publicstaticnativebyte[] templateExtraction(Bitmapvar0, FaceBoxvar1);

Calculate cosine similarity for the matching

publicstaticnativefloatsimilarityCalculation(byte[] var0, byte[] var1);

SDK Codes

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

Classes

FaceResult

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
publicclassFaceResult {
publicRectrect;
publicintliveness;
publicintgender;
publicintmask;
publicintage;
publicfloatyaw;
publicfloatroll;
publicfloatpitch;
publicbyte[] feature;
publicbyte[] faceData;
publicintorient;
publicintfaceId;
publicFaceResult() {
}
}

Here's our official document

List of our Products

Contact

faceplugin.comfaceplugin.com

Releases

Packages

Contributors

Languages