face_overlay 0.1.0 copy "face_overlay: ^0.1.0" to clipboard
face_overlay: ^0.1.0 copied to clipboard

Real-time AR face overlay for Flutter. Uses CameraX (Android) and AVFoundation (iOS) with Google MediaPipe Face Landmarker to detect 478 facial landmarks and render any PNG image as an overlay on dete [...]

0.1.0 #

Initial release of face_overlay.

Face detection #

  • Integrated Google MediaPipe Face Landmarker (478-point model, LIVE_STREAM mode) for real-time face detection on Android and iOS.
  • Supports detecting up to N faces simultaneously, configurable via FaceOverlayConfig.maxFaces.
  • Exposes minFaceDetectionConfidence, minFacePresenceConfidence, and minTrackingConfidence thresholds for tuning detection sensitivity.
  • Landmark data is streamed from native to Flutter per frame via EventChannel, keeping the UI thread free.
  • Plugin bundles the face_landmarker.task model asset — no separate download needed.

AR overlay #

  • OverlayAsset — attach any PNG image to every detected face.
  • Overlay is scaled in cover mode (max(faceW, faceH) base) so it always fills the face bounding box.
  • Overlay top is aligned to the forehead landmark and bottom to the chin landmark in portrait orientation.
  • widthScale and anchorOffset parameters allow per-overlay size and position fine-tuning.
  • debugLandmarks flag renders all 478 landmarks as dots for alignment debugging.

Platform #

  • Android: CameraX Preview + ImageAnalysis, DisplayManager.DisplayListener for orientation tracking, bitmap rotation applied before MediaPipe to match display coordinate space.
  • iOS: AVFoundation AVCaptureSession with AVCaptureVideoDataOutput, landmark results dispatched to main thread before forwarding to Flutter.
  • Minimum Android SDK: 24 (API 24 / Android 7.0).
  • Minimum iOS deployment target: 14.0.
0
likes
140
points
103
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Real-time AR face overlay for Flutter. Uses CameraX (Android) and AVFoundation (iOS) with Google MediaPipe Face Landmarker to detect 478 facial landmarks and render any PNG image as an overlay on detected faces via CustomPainter.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on face_overlay

Packages that implement face_overlay