Giter Site home page Giter Site logo

chhotu2980 / facerecognition-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kby-ai/facerecognition-android

0.0 0.0 0.0 86.26 MB

This is a demonstration of face recognition and 3D passive liveness detection. The system functions similarly to a time-attendance system.

Java 47.82% Kotlin 52.18%

facerecognition-android's Introduction

๐Ÿ‘ Product List

https://github.com/kby-ai/Product

๐Ÿ‘ We have published the Face Liveness Detection(Face Anti-Spoofing), Face Recognition SDK and ID Card Recognition SDK for the server.

FaceRecognition-Android

Overview

The demo project demonstrates both Face Liveness Detection and Face Recognition Technology.

The demo is integrated with KBY-AI's Standard 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

https://drive.google.com/file/d/1cn_89fYDYhq8ANXs2epO-KBv7p5ZnWcA/view?usp=sharing

Screenshots

SDK License

The face recognition project relies on kby-ai's SDK, which requires a license for each application ID.

Email: [email protected]

Telegram: @kbyai

WhatsApp: +19092802609

Skype: live:.cid.66e2522354b1049b

About SDK

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

2. Initializing an SDK

  • Step One

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

FaceSDK.setActivation("...")

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.

FaceSDK.init(getAssets());

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

3. SDK Classes

  • FaceDetectionParam

    This class serves as the input parameter for face detection, allowing the inclusion of face liveness detection and specifying the desired liveness detection level.

    Feature Type Name
    Check liveness boolean check_liveness
    Check liveness level int check_liveness_level

    When check_liveness_level is set to 0, the liveness detection achieves high accuracy. When check_liveness_level is set to 1, the liveness detection operates with light weight.

4. APIs

- Face Detection and Liveness Detection

The FaceSDK offers a single function for detecting faces, allowing the inclusion of face liveness detection and specifying the desired liveness detection level.

FaceSDK.faceDetection(bitmap, param)

This function requires two parameters: a Bitmap object and a FaceDetectionParam object that enables various processing functionalities.

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.

- Create Templates

The FaceSDK provides a function that can generate a template from a bitmap image. This template can then be used to verify the identity of the individual captured in the image.

byte[] templates = FaceSDK.templateExtraction(bitmap, faceBox);

The SDK's template extraction function takes two parameters: a bitmap object and an object of FaceBox.

The function returns a byte array, which contains the template that can be used for person verification.

- Calculation similarity

The "similarityCalculation" function takes a byte array of two templates as a parameter.

float similarity = FaceSDK.similarityCalculation(templates1, templates1);

It returns the similarity value between the two templates, which can be used to determine the level of likeness between the two individuals.

- 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

facerecognition-android's People

Contributors

justin200914 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.