Skip to content

Latest commit

 

History

History
172 lines (140 loc) · 7.76 KB

README.md

File metadata and controls

172 lines (140 loc) · 7.76 KB

Hugging Face - Here

Open Source FaceSDK- 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 Badge Star Badge issue pr

Screenshots

On the Youtube

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

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

public static native int setActivation(java.lang.String s);

Init model for face recognition and liveness detection

public static native int init(AssetManager var0);

Convert camera frame in YUV to Bitmap

public static native Bitmap yuv2Bitmap(byte[] var0, int var1, int var2, int var3);

Run face recognition and liveness detection

public static native List<FaceBox> faceDetection(Bitmap var0, FaceDetectionParam var1);

Extract feature vector for the enrollment

public static native byte[] templateExtraction(Bitmap var0, FaceBox var1);

Calculate cosine similarity for the matching

public static native float similarityCalculation(byte[] var0, byte[] var1);

SDK Codes

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

Classes

FaceResult

Type Name Description
Rect rect Bounding box for face
int liveness Liveness status: 0 for spoof, 1 for real, less than 0 for unknown
int gender Gender classification result
int mask Mask presence: 0 for no mask, 1 for mask
int age Age estimation result
float yaw Yaw angle: -45 to 45 degrees
float roll Roll angle: -45 to 45 degrees
float pitch Pitch angle: -45 to 45 degrees
byte[] feature 2056-byte facial feature data
byte[] faceData Encrypted facial data
int orient Face orientation: 1 for no rotation, 2 for 90° rotation, 3 for 270° rotation, 4 for 180° rotation
int faceId Face ID in the tracking face mode
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() {
    }
}

Here's our official document

List of our Products

Contact

faceplugin.comfaceplugin.comfaceplugin.com