Sample Application

1:N Face Identification and Liveness Detection SDK Android Demo


Download APK

Recognito_FaceDemo.apk [49.5M]


Build Project

- Download and Open Project

- Setting Up SDK License Key

  • Add license to assets/license file:

Android-FaceRecognition-FaceLivenessDetection/app/src/main/assets/license
 BsTr9o4f4R/rM3TxbCWVb/hrOJuOIdz8ArQ/t2IgQFFUQzGHOLNNaMJiK/fUfr5zo005zoTA/cm6 
 VoZ6iGl+/hZGA3R5T/VWwhxekbw8JVz9sNesU6rMG5+1cNSN75trH2tpzdCPZ28ZDnZlttmiuUoC 
 9QazRe1xKi5tUXa+xgIxzL0vE6UW2dLKWaEXjn3fSJfLxXWw0q+UZP0hQAXb5Y9Yl/NVi7y3d0xT 
 Vq6/weuMQkgLcNdLqFRvQXup0M9W/pvuhaubySAxHCKVY8wToygN2iM78cOkyyAbGVwZeGQP0Jfd 
 46VZo+w+KCNw355j3osVVMghrOcVZnfbp1dNyg== 
  • Build Project.

- Integration Guide

  • Import FaceSDK

import com.bio.facesdk.FaceBox
import com.bio.facesdk.FaceDetectionParam
import com.bio.facesdk.FaceSDK
  • Activate and Initialize FaceSDK

var ret = FaceSDK.setActivation(license_str)

if (ret == FaceSDK.SDK_SUCCESS) {
    ret = FaceSDK.init(assets)
}
  • YUV to Bitmap for camera frame

override fun process(frame: Frame) {
    val bitmap = FaceSDK.yuv2Bitmap(frame.image, frame.size.width, frame.size.height, cameraOrientation)
    ...
  • Set FaceDetectionParam and Detect Face

val faceDetectionParam = FaceDetectionParam()
faceDetectionParam.check_liveness = true
faceDetectionParam.check_liveness_level = SettingsActivity.getLivenessModelType(this)
var faceBoxes: List<FaceBox>? = FaceSDK.faceDetection(bitmap, faceDetectionParam)
  • Extract Face Template

val faceBox = faceBoxes[0]
val templates = FaceSDK.templateExtraction(bitmap, faceBox)
  • Calculate Similarity

val similarity = FaceSDK.similarityCalculation(templates, person.templates)

Application UI

Last updated