Help Center
  • Welcome to KBY-AI
  • Product
    • Face Liveness Detection SDK, Face Recognition SDK
      • Basic SDK - Mobile
        • Basic SDK - Android
        • Basic SDK - iOS
      • Standard SDK - Mobile
        • Standard SDK - Android
        • Standard SDK - iOS
      • Premium SDK - Mobile
        • Premium SDK - Android
        • Premium SDK - iOS
      • Face Liveness Detection SDK - Server
      • Face Recognition SDK - Server
    • ID Card Recognition SDK
      • ID Card Recognition SDK - Android
      • ID Card Recognition SDK - iOS
      • ID Card Recognition SDK - Server
      • Supported Documents
      • Result Parsing
    • ID Document Liveness Detection SDK
    • ID Document Auto Capture Web
    • Palm Recognition SDK
      • Palmprint Recognition SDK - Server
      • Palmvein Recognition SDK - Server
    • Automatic License Plate/Number Recognition SDK
      • License Plate Recognition-Server
      • License Plate Recognition-Flutter
      • License Plate Recognition-Android
    • Computer Vision Solutions
      • Fire/Smoke Detection-Server
  • Demo Projects
    • Mobile (Android, iOS)
      • FaceLivenessDetection - Android
      • FaceLivenessDetection - iOS
      • FaceRecognition - Android
      • FaceRecognition - iOS
      • FaceRecognition - Flutter
      • FaceRecognition - Ionic-Cordova
      • FaceRecognition - React-Native
      • FaceAttribute - Android
      • FaceAttribute - iOS
      • FaceAttribute - Flutter
      • IDCardRecognition - Android
      • IDCardRecognition - iOS
      • License Plate Recognition-Flutter
      • License Plate Recognition-Android
    • Server (Windows, Linux)
      • FaceLivenessDetection - Windows
      • FaceLivenessDetection - Docker
      • FaceLivenessDetection - C# - .NET
      • FaceRecognition - Windows
      • FaceRecognition - Docker
      • FaceRecognition - C# - .NET
      • IDCardRecognition - Windows
      • IDCardRecognition - Docker
      • IDCardRecognition - C# - .NET
      • Palm Print Recognition SDK - Docker
      • Palm Vein Recognition SDK - Docker
      • License Plate Recognition-Docker
      • License Plate Recognition - C# - .NET
  • FAQ
    • How can I set up a Kubernetes system?
    • Has KBY-AI's facial algorithm been certified by a reliable standard measurement authority?
    • Accelerating KBY-AI SDKs with Kubernetes Configuration
Powered by GitBook
On this page
  • Overview
  • Github
  • Google Play
  • App Store
  • YouTube
  • Screenshots
  • How to Run
  • 1. React-Native Setup
  • 2. Running the App
  • About SDK
  • 1. Setup
  • 2. API Usage
  1. Demo Projects
  2. Mobile (Android, iOS)

FaceRecognition - React-Native

This demo app demonstrates face recognition and face liveness detection by mitigating biometric fraud based on React-Native framework for both Android and iOS.

PreviousFaceRecognition - Ionic-CordovaNextFaceAttribute - Android

Last updated 4 months ago

Overview

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

It stands for face recognition React-Native, facial recognition React-Native, face liveness check React-Native, spoofing prevention React-Native, face matching React-Native, face comparison React-Native, face search engine React-Native, face identification React-Native.

Github

Google Play

App Store

YouTube

Screenshots

How to Run

1. React-Native Setup

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:

2. Running the App

Run the following commands:

yarn
yarn example android

About SDK

1. Setup

1.1 Face SDK Setup

Android

  • Copy the SDK (libfacesdk folder) to the android folder of your project.

  • Add SDK to the project in settings.gradle.

include ':libfacesdk'

2. API Usage

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 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();
    }

To build the native camera screen and process face detection, please refer to the file in the repository.

example/src/FaceRecognitionPage.tsx
GitHub - kby-ai/FaceRecognition-React-Native: Face Recognition, Face Livness Detection React-Native DemoGitHub
Face Recognition - Apps on Google PlayGooglePlay
Logo
‎KBY-AI Face RecognitionApp Store
Logo
Logo
Setting up the development environment · React Nativereactnative
Logo