🌐 Company Site - Here
🤗 Hugging Face - Here
🛟 Help Center - Here
🐳 Docker Hub - Here
Ready in ~15 minutes (after runtime download): Drop Android AAR + iOS frameworks → Run the example on a phone Jump: Quick start · Get the runtimes · Run the demo · Integrate into your app · Dart API
Customer repo name: FaceRecognition-Flutter
Use this for the example app (check each box in order):
- Clone
FaceRecognition-Flutterand rundart run tool/bootstrap.dart(orflutter pub getat root +example/) - Fix anything
flutter doctorreports (Android toolchain, Xcode, licenses, JDK) - Download runtimes from Google Drive
- Android: copy
facerecognitionsdk.aar→example/android/libfacesdk/ - iOS: unzip frameworks →
ios/Frameworks/(facerecognitionsdk,FaceRecognitionEngine,onnxruntime) - iOS (macOS):
cd example/ios && pod install -
cd example && flutter run(physical device recommended) - Home screen status bar shows Ready → Enroll / Identify / Capture / Attribute
Integrating into your own app? Skip to Integrate into your own app — Android AAR path is different (
…/android/libs/under the plugin dependency). Full API and layer guide: doc.faceplugin.com.
FacePlugin Face Recognition SDK for Flutter is a fully on-device biometric plugin for Android and iOS. Enroll faces, identify in 1:N with VideoWorker, capture with an oval coach, and read attributes with 2D liveness — all on the phone. The pub package face_recognition_sdk wraps the same native engines as our Android and iOS apps. Drop either the full FaceRecognitionSDK runtime or the FaceRecognition-Liveness runtime — see Native packs.
All processing stays on the device. No biometric data is sent to FacePlugin cloud — built for KYC, eKYC, and cross-platform mobile onboarding.
This repository contains:
| Folder | Purpose |
|---|---|
| Repository root | face_recognition_sdk — the Flutter plugin you depend on in your app |
example/ |
Full demo (Enroll, Identify, Capture, Attribute, Settings, About) |
Native binaries are not on GitHub (too large). Download them from Google Drive (links below) and copy into the paths shown.
| Feature | Supported |
|---|---|
| Gallery enroll (single-face template) | ✓ |
| Live 1:N identify with VideoWorker | ✓ |
| 2D liveness / anti-spoofing on identify | ✓ |
| Oval capture coach with optional enroll | ✓ |
| Gallery attributes, landmarks, age, gender, emotion | ✓ with the FaceRecognitionSDK pack |
| Local person database (demo) | ✓ |
| Settings (thresholds / clear DB) | ✓ |
Attribute fields (age, gender, emotion, mask, glasses, landmarks) come from the FaceRecognitionSDK pack. The FaceRecognition-Liveness pack returns detection, templates, 1:N identity, and the liveness score.
| Platform | Repository |
|---|---|
| Android (Recognition) | FaceRecognition-Android |
| iOS (Recognition) | FaceRecognition-iOS |
| Android (Recognition-Liveness) | FaceRecognition-Liveness-Android |
| iOS (Recognition-Liveness) | FaceRecognition-Liveness-iOS |
| React Native (Recognition) | FaceRecognition-React-Native |
| Flutter (Recognition) | FaceRecognition-Flutter (this repo) |
| Ionic Capacitor (Recognition) | FaceRecognition-Ionic-Capacitor |
| Ionic Cordova (Recognition) | FaceRecognition-Ionic-Cordova |
| Windows (Recognition) | FaceRecognition-Windows |
| Linux / Docker (Recognition) | FaceRecognition-Docker |
| Android (Liveness) | FaceLivenessDetection-Android |
| iOS (Liveness) | FaceLivenessDetection-iOS |
| Windows (Liveness) | FaceLivenessDetection-Windows |
| Linux / Docker (Liveness) | FaceLivenessDetection-Docker |
| Step | What you need |
|---|---|
| 1 | Flutter (3.44+ recommended). Run flutter doctor and fix reported issues |
| 2 | JDK 17+ for Android. Prefer Android Studio’s bundled JDK. JAVA_HOME must point to the JDK home (folder that contains bin), not to bin itself. Optionally: flutter config --jdk-dir <path-to-jdk-home> |
| 3 | Accept Android licenses: flutter doctor --android-licenses |
| 4 | Physical device recommended (camera / liveness; emulator is limited) |
| 5 | Android facerecognitionsdk.aar and iOS frameworks — see Get the runtimes |
| 6 | Demo licenses are in example/lib/core/constants/license.dart (Android com.faceplugin.facerecognitionsdk, iOS com.faceplugin.facerecognition.app). Request a new key only if you change applicationId / bundle id — see SDK License |
You can run the example app as-is after placing the runtimes. Home tiles unlock when the status bar shows Ready.
| Platform | Requirement |
|---|---|
| Flutter | 3.44+ (see pubspec.yaml) |
| Android | minSdk 24, physical device recommended |
| iOS | iOS 13+, physical device recommended |
| Dart | 3.3+ |
The Dart API and the copy paths below are the same for both packs. The Drive folder chooses the model. Place the Android AAR and the iOS frameworks from the same pack. Each runtime includes its frc.fpk models.
| Pack | What it includes | Android | iOS |
|---|---|---|---|
| FaceRecognitionSDK | Full SDK: detection, template extraction, 1:1 match, 1:N identify, 2D liveness, and attribute models (age, gender, emotion, mask, glasses, landmarks) | Google Drive | Google Drive |
| FaceRecognition-Liveness | Recognition and liveness: detection, template extraction, 1:1 match, 1:N identify, and 2D liveness | Google Drive | Google Drive |
The example screenshots and the Attribute tile use the full FaceRecognitionSDK pack.
Google Drive — FaceRecognitionSDK Android · Google Drive — FaceRecognition-Liveness Android
| File | Example app path | Your own app path |
|---|---|---|
facerecognitionsdk.aar |
example/android/libfacesdk/facerecognitionsdk.aar |
Your app’s android/libfacesdk/facerecognitionsdk.aar + include(":libfacesdk") (copy the module from the example — do not use implementation(files(…aar)) on the plugin) |
Google Drive — FaceRecognitionSDK iOS · Google Drive — FaceRecognition-Liveness iOS
Unzip into ios/Frameworks/:
ios/Frameworks/
├── facerecognitionsdk.framework
├── FaceRecognitionEngine.framework
└── onnxruntime.framework
Then on a Mac: dart run tool/bootstrap.dart (builds matching .xcframeworks) and cd example/ios && pod install. CocoaPods links the .xcframeworks into the plugin pod — plain .framework alone often leaves undefined FaceRecognitionSDK symbols under use_frameworks!.
git clone https://github.com/Faceplugin-ltd/FaceRecognition-Flutter.git
cd FaceRecognition-Flutter
dart run tool/bootstrap.dart
# Place AAR + iOS frameworks as above
cd example
flutter runKeep demo ids for the included license:
| Platform | Id |
|---|---|
Android applicationId |
com.faceplugin.facerecognitionsdk |
| iOS bundle id | com.faceplugin.facerecognition.app |
- Wait for the home status bar → Ready.
- Use Enroll, Identify, Capture, and Attribute for on-device 1:N matching, oval capture, attributes, and 2D liveness.
| Home | Identify | Capture |
|---|---|---|
| Capture result | Attribute | Attribute (emotion) |
|---|---|---|
| Attribute (quality) | Settings | About |
|---|---|---|
| Home (tiles) | Attribute (liveness) |
|---|---|
Licenses are offline and bound to your applicationId / bundle identifier.
The sample app already includes a valid key for com.faceplugin.facerecognitionsdk. You only need a new key if you use a different id.
The code below shows how to use the license:
FaceRecognition-Flutter/example/lib/core/constants/license.dart
Lines 6 to 14 in 7ecff0a
FaceRecognition-Flutter/example/lib/services/sdk_service.dart
Lines 28 to 39 in 7ecff0a
Please contact us to get a license for your own app.
You need the Flutter plugin + native runtimes. You do not need the example UI or person database (those are demo-only).
- Add a path or git dependency:
dependencies:
face_recognition_sdk:
git:
url: https://github.com/Faceplugin-ltd/FaceRecognition-Flutter.gitOr path:
dependencies:
face_recognition_sdk:
path: ../FaceRecognition-Flutter- Copy runtimes:
| Platform | Copy to |
|---|---|
| Android | Copy example/android/libfacesdk/ into your app android/libfacesdk/, put facerecognitionsdk.aar there, and include(":libfacesdk") in settings.gradle(.kts). (Do not implementation(files(…aar)) inside the plugin — AGP will fail bundleDebugAar.) |
| iOS | Plugin checkout ios/Frameworks/ (three frameworks), then pod install |
-
Set your
applicationId/ iOS bundle id and request a license for that id (not the demo id). -
Permissions: camera + photo library (see example
AndroidManifest.xml/Info.plist). -
Minimal usage:
import 'package:face_recognition_sdk/face_recognition_sdk.dart';
Future<void> activate() async {
final code = await getMachineCode(); // FPMC1.… — send when requesting a key
final act = await setActivation('FP1.…'); // bound to YOUR applicationId / bundle id
if (act != sdkSuccess) {
throw StateError(await lastLicenseError());
}
final initCode = await init();
if (initCode != sdkSuccess) {
throw StateError('init failed: $initCode');
}
}
Future<void> enrollStill(String imagePath) async {
final faces = await faceDetection(imagePath);
if (faces.length != 1) return;
final template = await templateExtraction(imagePath, faces.first);
final cropB64 = await cropFace(imagePath, faces.first);
// Store template + crop in YOUR database
}Thresholds (identify, liveness, pose, eye-close, Capture settings) are parameters you pass from Dart — change them freely for your product. Defaults in the example Settings match FaceRecognitionSDK Apps (identify 0.67, liveness 0.8, level 0, pose 40°, eyeclose 0.5).
Call order: getMachineCode → setActivation → init → detect / VideoWorker → deinit when done.
| API | Purpose |
|---|---|
getMachineCode() |
FPMC1.… for license requests |
setActivation(license) |
Activate with FP1.… |
init() / deinit() |
Load / unload engine |
faceDetection(image, param?) |
Canonical FaceBox list |
detect(image, crop?, flags?) |
Raw engine JSON |
templateExtraction / cropFace / similarity |
Enroll + 1:1 match |
startVideoWorker / syncVideoWorkerDatabase / ingestLiveCameraFrame |
Live 1:N |
videoWorkerEvents |
Stream of tracking / match JSON |
FaceCapture |
Optional oval capture UI (package:face_recognition_sdk/capture) |
lastLicenseError() |
Human-readable license failure |
Boxes include geometry (x1,y1,x2,y2), pose, and liveness / quality scores and labels. With the FaceRecognitionSDK pack they also include age / gender / emotion / mask / glasses, the optional attributes map, eyes / occlusion, and landmarks + landmarkCount. The FaceRecognition-Liveness pack leaves those attribute fields empty.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | License invalid |
| 2 | License expired |
| 3 | Not activated |
| 4 | Init failed |
| Path | Role |
|---|---|
example/lib/core/constants/license.dart |
Demo FP1 keys only |
example/lib/services/ |
SdkService, Settings, PersonDatabase (demo) |
example/lib/screens/ |
Home, Identify, Capture, Attribute, Result, Settings, About |











