This is a Flutter plugin for real-time, on-device, offline face & eye detection.
- Finds face mid-points, eye positions, and face poses in images.
Android only, at present. (iOS support is planned.)
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}");
}
- At present, iOS is not supported. This will be addressed in a future major release.