face_overlay 0.1.0
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_STREAMmode) for real-time face detection on Android and iOS. - Supports detecting up to N faces simultaneously, configurable via
FaceOverlayConfig.maxFaces. - Exposes
minFaceDetectionConfidence,minFacePresenceConfidence, andminTrackingConfidencethresholds 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.taskmodel 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.
widthScaleandanchorOffsetparameters allow per-overlay size and position fine-tuning.debugLandmarksflag renders all 478 landmarks as dots for alignment debugging.
Platform #
- Android: CameraX
Preview+ImageAnalysis,DisplayManager.DisplayListenerfor orientation tracking, bitmap rotation applied before MediaPipe to match display coordinate space. - iOS: AVFoundation
AVCaptureSessionwithAVCaptureVideoDataOutput, 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.