Skip to content

A flutter plugin that implements Google's MediaPipe Face Detection

Notifications You must be signed in to change notification settings

TecHaxter/google_mediapipe_face_detection

Repository files navigation

google_mediapipe_face_detection

A flutter plugin that implements Google's MediaPipe Face Detection.

Getting Started

This project is a starting point for a Flutter Google's MediaPipe Face Detection library, a specialized library that includes platform-specific implementation code for Web.

For help getting started with, Check the example project.

Full API reference will be available very shortly. Ask the Author if need any help.

Installation

flutter pub add google_mediapipe_face_detection

Usage

import 'package:google_mediapipe_face_detection/google_mediapipe_face_detection.dart';

GoogleMediapipeFaceDetection? faceDetection;

void initializeModel() async {
  faceDetection = GoogleMediapipeFaceDetection()
  await faceDetection?.load();
}

void detectFaces() async {
  final capturedImage = await cameraController?.takePicture();
  if (capturedImage == null) {
    throw 'Empty Camera Image';
  }
  InputImage inputImage =
  InputImage.fromFilePath(capturedImage.path);
  final res = await faceDetection?.processImage(inputImage);
  print(res);
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

A flutter plugin that implements Google's MediaPipe Face Detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published