flutter_face_detection 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 71

Flutter Face Detection #

Project license Pub package Dartdoc reference Travis CI build status

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.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.1.0] - 2019-02-18 #

Added #

  • Face, FaceDetector, and FacePainter classes
  • A basic example app demonstrating usage with static image assets


flutter_face_detection_example #

Demonstrates how to use the flutter_face_detection plugin.

Screenshot #


Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_face_detection: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_face_detection/flutter_face_detection.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/src/face_painter.dart.

Run flutter format to format lib/src/face_painter.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (flutter_android).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-2.19 points)

The package was last published 53 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_android ^0.3.4 0.3.7 0.4.0
meta ^1.1.6 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
platform 2.2.1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
test any