react-native-face-ai Plugin with Liveness Detection - Fully On Premise
August 31, 2025 · View on GitHub
About「FaceAI SDK」
FaceAI SDK is on_device Offline Face Detection 、Recognition 、Liveness Detection Anti Spoofing and 1:N/M:N Face Search SDK
react-native-face-ai Plugin with Liveness Detection - Fully On Premise
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
FaceAI SDK'sface liveness detectionandface recognitiontechnology into theReact-Nativeproject for bothAndroidandiOS.
This is on-premise face recognition SDK which means everything is processed in your phone and NO data leaves the device.
Support
This library follows the React Native releases support policy.
It is supporting the latest version, and the two previous minor series.
Setup
$ npm install --save react-native-face-ai
# --- or ---
$ yarn add react-native-face-ai
## API Usages
#### 2.1 FaceAI
- Activate the `FacAI` by calling the `setActivation` method:
```kotlin
var ret = await FaceAI.setActivation("...");
console.log("set activation:", ret);
- Initialize the
FaceAIby calling theinitSDKmethod:
var ret = await FaceAI.initSDK();
- Set parameters using the
setParammethod:
var ret = await FaceAI.setParam(checkLivenessLevel);
- Extract faces using the
extractFacesmethod:
var faceBoxes = await FaceAI.extractFaces(uri);
- Calculate the similarity between faces using the
similarityCalculationmethod:
const similarity = await FaceAI.similarityCalculation(
face.templates,
person.templates
);
FaceAI
- To build the native camera screen and process face detection, please refer to the example/App.tsx file in the repository.