Skip to content
pubscout

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.

$ flutter pub add google_mlkit_face_detection
Source repository

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.