face_recognition_engine 1.1.0
face_recognition_engine: ^1.1.0 copied to clipboard
On-device face recognition for Flutter using MobileFaceNet embeddings and cosine matching, with multi-angle enrollment storage and anti-spoofing hooks.
1.1.0 #
Minor rather than patch: the dependency and SDK floors below are breaking for apps on older Flutter or Android.
Dependencies #
- Upgraded to
camera^0.12.0,google_mlkit_face_detection^0.15.1 andimage^4.9.2. - Raised minimum requirements to match: Flutter 3.44 / Dart 3.12, Android
minSdkVersion 24(was 21, required bycamera), and iOS deployment target 15.5 (required bygoogle_mlkit_face_detection). The README now states these in a Requirements table.
Example #
- The example is now runnable: added
android/andios/projects with camera permission (CAMERA,NSCameraUsageDescription),minSdk 24, iOS deployment target 15.5, and the Gradle JVM-target block. Drop a MobileFaceNet.tfliteintoexample/assets/— the directory is declared as a whole, so no pubspec edit is needed — andflutter run. Seeexample/README.md. - Stopped tracking (and therefore publishing)
.flutter-plugins-dependencies, a generated file that embeds absolute local paths.
Documented #
- Added an Android JVM target mismatch section to the README.
tflite_fluttercompiles Java at 11 andcamera_android_cameraxat 17, while their Kotlin tasks default to the toolchain, which AGP rejects — consuming apps need asubprojectsblock pinning both to 17, placed before Flutter's generatedevaluationDependsOn(":app")line.
Fixed #
- iOS support for the bundled camera screens.
EnrollmentScreenandDetectionScreenpreviously always requested and decoded NV21, an Android format; on iOS the BGRA8888 frames were misread and embeddings were garbage. They now stream NV21 on Android and BGRA8888 on iOS. - Added
FaceRecognitionUtil.bgra8888ToImage(honours row padding viabytesPerRow) andFaceRecognitionUtil.cameraImageToImage, which picks the decoder from the frame's raw pixel format and returns null for formats it cannot decode. FaceRecognizer.embedCameraImagenow decodes NV21 and BGRA8888, and throwsUnsupportedErroron other formats instead of embedding mis-decoded pixels.- Fixed the
FaceRecognizerdartdoc sample, which calledcreate()with no arguments — that throws, since a model must be supplied. - Reworked the README: badges, a features table, an accurate screenshots
section, documented defaults for
RecognitionConfigandSpoofDetector, and a new section on how guided enrollment picks its poses. - Fixed incorrect README guidance:
EnrollmentResult.photoJpg(encoded JPEG bytes) is not interchangeable withFaceProfileStore.savePhoto(which takes a decodedimg.Image) — both routes are now shown.
1.0.3 #
- Added a screenshots section to the README showing the enrollment, liveness and live-recognition screens.
1.0.2 #
- Reordered the pub.flutter-io.cn screenshots so the identified-result dialog comes first and is used as the package thumbnail.
1.0.1 #
- Fixed the enrollment status text running two prompts together while capturing, e.g. "Hold still — capturing Turn your head right". It now reads "Hold still — capturing the right profile".
- Added screenshots of the enrollment, liveness and live-recognition flows to the pub.flutter-io.cn listing.
1.0.0 #
First public release.
FaceRecognitionKit.enroll(context, ...)— opens a guided multi-angle camera and returns the captured embeddings (+ a front-pose JPEG) as anEnrollmentResult.FaceRecognitionKit.detect(context, candidates: ...)— opens a live camera, runs the configured liveness / anti-spoofing checks, and returns the matchedFaceProfileas aDetectionResult.EnrollmentScreen/DetectionScreenwidgets for custom navigation.FaceRecognizer— headless engine: load a model, embed a frame, identify probes.FaceProfileStore— file-backed multi-angle enrollment storage.RecognitionConfig— immutable, JSON-serialisable thresholds for recognition and liveness / anti-spoofing; drives both flows.SpoofDetector— passive texture/CNN anti-spoofing (bring your own model).FaceRecognitionUtil— low-level NV21 decode, crop, embed and cosine-match primitives.- No model is bundled — supply a MobileFaceNet
.tflite(112×112 → 192-d) viamodelAsset:ormodelBytes:. See the README "Model & license" section.