mml_face_sdk 0.1.1-dev.1
mml_face_sdk: ^0.1.1-dev.1 copied to clipboard
Offline, on-device 1:1 face verification and passive liveness SDK.
MML Face SDK #
Production-oriented Flutter plugin for offline, on-device 1:1 face comparison and passive liveness on Android and iOS. Native code performs face detection, five-landmark alignment, TensorFlow Lite inference, quality gating, and decision state. Model weights are not published with this package: activation installs a privately delivered, per-activation encrypted model pack into app-private storage. The service never receives images, video, embeddings, or templates.
Status: pre-release integration baseline. The bundled thresholds (
0.70similarity and0.75liveness) reproduce the source application behavior. They are not independently validated operating points. Calibrate against representative users, devices, capture conditions, and attack media before production.
Capabilities #
- Enrollment/template creation from one encoded image.
- Recognition-only 1:1 comparison.
- Passive liveness plus 1:1 verification using two MiniFAS models and a four-frame median.
- Single-face, minimum-size, pose, landmark, finite-output, and template-version gates.
- Lifetime Ed25519 licence bound to the customer app and each activated installation, then verified fully offline.
- A reusable customer key activates multiple installations of one Android package or iOS bundle identifier.
Quick start #
import 'package:mml_face_sdk/mml_face_sdk.dart';
final sdk = MmlFaceSdk(
publicLicenseKey: SimplePublicKey(publicKeyBytes, type: KeyPairType.ed25519),
);
await sdk.initialize(license: tokenStoredInSecureStorage);
final template = await sdk.createTemplate(enrollmentJpegBytes);
final recognition = await sdk.recognize(encodedImage: probeJpegBytes, template: template);
final verified = await sdk.verify(encodedImage: nextLivenessFrame, template: template);
For liveness, submit four consecutive same-session frames/captures. Call resetLiveness() when the subject, camera session, or flow changes. The demo uses the system camera picker for portability; a shipping app should integrate a guided native frame stream at a controlled cadence.
See integration guide, API reference, threat model, attack statement, privacy notes, model inventory, and release checklist.
Development #
flutter pub get
flutter analyze
flutter test
cd example
flutter run --dart-define=MML_LICENSE_PUBLIC_KEY=vJZyhTYJIS4JWop8tIlY1Juyzpyv434M_BUQhgHzgDY --dart-define=MML_ACTIVATION_URL=https://mml-face-license.hamzaasif19974-69b.workers.dev/v1/activate
The source attendance app is not a dependency and is not modified. This public package contains no biometric model weights. Commercial activation and a private model pack are required for inference.
Support: hamzaasif19974@gmail.com
Website: mobilemllabs.com · Source and issues