Skip to content

kby-ai/FaceRecognition-React-Native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€— Hugging Face - Here

πŸ“š Product & Resources - Here

πŸ›Ÿ Help Center - Here

πŸ’Ό KYC Verification Demo - Here

πŸ™‹β€β™€οΈ Docker Hub - Here

FaceRecognition-React-Native

Overview

This repository demonstrates both face liveness detection and face recognition technology for React-Native on Android and iOS platforms.

In this repository, we integrated KBY-AI's face liveness detection and face recognition technology into the React-Native project for both Android and iOS.

β—ΎFaceSDK(Mobile) Details

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

β—ΎFaceSDK(Mobile) Product List

No. Repository SDK Details
1 Face Liveness Detection - Android Basic SDK
2 Face Liveness Detection - iOS Basic SDK
3 Face Recognition - Android Standard SDK
4 Face Recognition - iOS Standard SDK
5 Face Recognition - Flutter Standard SDK
6 Face Recognition - Ionic-Cordova Standard SDK
➑️ Face Recognition - React-Native Standard SDK
8 Face Attribute - Android Premium SDK
9 Face Attribute - iOS Premium SDK
10 Face Attribute - Flutter Premium SDK

To get Face SDK(server), please visit products here.

Try with Demo App

Google Play

App Store

Performance Video

You can visit our YouTube video here to see how well our demo app works.

Face Recognition Android

Screenshots

SDK License

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

  • The code below shows how to use the license:

    var ret = await FaceSDKModule.setActivation("BePdghcCJ6VWDMNYaYHLMJ3QhslLDlJHwq52hSiPswhbF42izz+0eE4qo6v9v0bY4QK0RwsZuqe1" +
    "5Ea18VOoUwIVR3pP6ozY2xQbbKF/RAgQ8pMy2pqSslCULMcj3yRJz72XRbuDWDO5NpbavHCP5aIT" +
    "BiAjgaVYgGrHbl/iqb4PP2O8cjRd7QmHj1Mye1vQWeQobzUaWtH4/2rF5X/BQKiz8qL/E7jccC6h" +
    "6SsyEfxZUyZFiPSv/XKRClM4mxCJiWmIEaEvJpn0HTmqqIt8dGkhE/ptQjyi3d83uzna7yDRRe+j" +
    "8fRYqeJlI7hgrMXU5We7xp1w5W0akIikG2Myrg==");
    console.log("set activation:", ret);
    ret = await FaceSDKModule.initSDK();

  • To request a license, please contact us:
    πŸ§™Email: [email protected]
    πŸ§™Telegram: @kbyai
    πŸ§™WhatsApp: +19092802609
    πŸ§™Skype: live:.cid.66e2522354b1049b
    πŸ§™Facebook: https://www.facebook.com/KBYAI

How To Run

1. Setting Up React-Native Development Environment

Make sure you have React-Native installed.
If you don't have React-Native installed, please follow the instructions provided in the official React-Native documentation here.

2. Running the Android App

Run the following commands:

yarn
yarn example android

3. Running the iOS App

Run the following commands:

yarn
cd example
yarn
cd ios
pod install

Please open the FaceRecognitionSdkExample.xcworkspace in Xcode and run the app.

About SDK

1. Setup

1.1 Setting Up Face SDK

Android

  • Copy the SDK (folder: libfacesdk) to the folder android in your project path.
  • Add the SDK to the project in settings.gradle
include ':libfacesdk'

2 API Usages

2.1 FaceSDKModule

  • Activate the FaceSDKModule by calling the setActivation method:
      var ret = await FaceSDKModule.setActivation("...");
      console.log("set activation:", ret);
  • Initialize the FaceSDKModule by calling the initSDK method:
    var ret = await FaceSDKModule.initSDK();
  • Set parameters using the setParam method:
  var ret = await FaceSDKModule.setParam(checkLivenessLevel);
  • Extract faces using the extractFaces method:
  var faceBoxes = await FaceSDKModule.extractFaces(uri);
  • Calculate the similarity between faces using the similarityCalculation method:
  const similarity = await FaceSDKModule.similarityCalculation(
      face.templates,
      person.templates
  );

2.2 FaceRecognitionSdkView

  <FaceRecognitionSdkView style={styles.box} livenessLevel={1} cameraLens={1} />
  • To obtain the face detection results, use the following code:
      const eventEmitter = new NativeEventEmitter(FaceSDKModule);
      let eventListener = eventEmitter.addListener('onFaceDetected', (event) => {
          setFaces(event);
          if (recognized == false) {
              identifyPerson(event);
          }
      });
  • To start and stop the camera, use the following code:
    //Start Camera
    const startCamera = async () => {
        await FaceSDKModule.startCamera();
    }

    //Stop Camera
    const stopCamera = async () => {
        await FaceSDKModule.stopCamera();
    }

About

Face Recognition, Face Livness Detection React-Native Demo

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published