google_mlkit_face_detection
1.0.3, released 8 days ago by flutter-ml.dev
Flutter plugin to use Google's ML Kit Face Detection on iOS and Android.
What it does
A Flutter plugin that uses Google's ML Kit Face Detection to detect faces in an image, identify key facial features, and get the contours of detected faces. Processing is handled natively via platform channels using Google's native APIs.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect faces and facial landmarks in images on Android and iOS.
- You want on-device face detection and classification without relying on external cloud APIs.
Skip it when
- You need support for web or desktop platforms.
- You are looking for a package maintained or sponsored directly by Google.
Strengths
- Provides access to Google's native ML Kit face detection capabilities.
- Supports face contours, facial landmarks, classification, and tracking.
Weaknesses
- Does not support web or other non-mobile platforms.
- Requires manual native setup for iOS (deployment targets, linker flags, resource bundles).
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires minimum iOS deployment target 15.0, Xcode 15.3.0+, Swift 5.9, adding linker flags (-ObjC, -all_load), and downloading GoogleMVFaceDetectorResources.bundle for iOS. Android requires minSdkVersion 21 and compileSdkVersion 36.
final options = FaceDetectorOptions(
enableContours: true,
enableLandmarks: true,
enableClassification: true,
);
final faceDetector = FaceDetector(options: options);
final List<Face> faces = await faceDetector.processImage(inputImage);
faceDetector.close();Works with
Packages commonly used together with google_mlkit_face_detection: ones it builds on, ones built on it, and its own family.
- google_mlkit_commonsgoogle_mlkit_face_detection depends on itCommon classes and utility methods for Google's ML Kit plugins
- google_mlkit_text_recognitionSame familyFlutter plugin to use Google's ML Kit Text Recognition on Android and iOS.
- google_mlkit_barcode_scanningSame familyA Flutter plugin to use Google's ML Kit Barcode Scanning on Android and iOS.
- google_mlkit_translationSame familyFlutter plugin for Google's ML Kit On-Device Translation.
- google_mlkit_selfie_segmentationSame familyFlutter plugin to use Google's ML Kit Selfie Segmentation API.
- google_mlkit_language_idSame familyDetermine the language of a text string using Google's ML Kit.
- google_mlkit_pose_detectionSame familyFlutter plugin for Google ML Kit Pose Detection on Android and iOS.
- google_mlkit_document_scannerSame familyFlutter plugin to use Google's ML Kit document scanner API to digitize physical documents.