Flutter Face Detection

Project license Pub package Dartdoc reference Travis CI build status

Screenshot

Screenshot

Features

  • Finds face mid-points, eye positions, and face poses in images.

Compatibility

Android only, at present. (iOS support is planned.)

Examples

Detecting faces in a static image

import 'package:flutter_face_detection/flutter_face_detection.dart';

var photo = Image.asset("images/einstein.png");

var bitmap = Bitmap.fromAssetImage(photo.image as AssetImage);
var detector = FaceDetector(width: 280, height: 396);

for (var face in await detector.findFaces(bitmap)) {
  print("Found a face at (${face.midPoint.x}, ${face.midPoint.y}) with confidence ${face.confidence}");
}

Caveats

  • At present, iOS is not supported. This will be addressed in a future major release.

Libraries

flutter_face_detection
Flutter plugin for face detection.