animated_face_detection 0.0.4 copy "animated_face_detection: ^0.0.4" to clipboard
animated_face_detection: ^0.0.4 copied to clipboard

Flutter package to facilitate facial recognition and configure steps to perform validation.

Animated_face_detection

Animated Face Detection

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


Buy Me A Book

Github Badge

🎯 About #

Animated Face Detection is a Flutter package to facilitate integration with facial recognition.

✨ Features #

✔️ Face Recognition
✔️ Steps face detection;

🏁 Starting #

Create a list of steps for facial recognition. These steps will be the animated steps that the end user will go through.

 final List<RecognitionStepItem> _veificationSteps = [];
_veificationSteps.addAll(
      [
        RecognitionStepItem(
          step: RecognitionStep.blink,
          title: "Pisque",
          isCompleted: false,
          detectionColor: Colors.amber,
        ),
        RecognitionStepItem(
          step: RecognitionStep.turnLeft,
          title: "Vire para a esquerda",
          isCompleted: false,
          detectionColor: Colors.amber,
        ),
        RecognitionStepItem(
          step: RecognitionStep.turnRight,
          title: "Vire para a direita",
          isCompleted: false,
          detectionColor: Colors.amber,
        ),
        RecognitionStepItem(
          step: RecognitionStep.smile,
          title: "Sorria",
          isCompleted: false,
          detectionColor: Colors.green.shade800,
        ),
      ],
    );

Call the configure function to initialize the package configurations, also passing the previously configured steps.

AnimatedFaceDetection.instance.configure(
      lineColor: Style.theme.white,
      dotColor: Style.theme.greenInformation,
      dotSize: 2.0,
      lineWidth: 2,
      dashValues: [2.0, 5.0],
      displayDots: false,
      displayLines: true,
      thresholds: [
        SmileDetectionThreshold(
          probability: 0.8,
        ),
        BlinkDetectionThreshold(
          leftEyeProbability: 0.25,
          rightEyeProbability: 0.25,
        ),
      ],
    );

Call the faceDetect function to navigate to the screen responsible for executing the entire recognition flow and at the end this same function will return the captured image data.

final CapturedImage? response = await AnimatedFaceDetection.instance.faceDetect(
      context,
      config: DetectionConfig(
        steps: _veificationSteps,
        startWithInfoScreen: true,
        showFacialVertices: false,
        maxSecToDetect: _timeOutDuration == 100 ? 2500 : _timeOutDuration,
        allowAfterMaxSec: _allowAfterTimeOut,
        captureButtonColor: Colors.red,
        textStartButtonFacePage: "Iniciar",
      ),
      style: DetectionStyle(
        backgroudMessageColor: Colors.white,
        textMessageColor: Colors.white,
        buttonTextColor: Colors.white,
        buttonColor: Style.theme.primaryColor,
        backgroundInfoPage: Colors.white,
        textColorInfo: Colors.black,
      ),
    );

📝 License #

This project is under license from BSD 3-Clause License. For more details, see the LICENSE file.


You can also buy me a cup of coffee #

Projeto desenvolvidor por: Jhonathan Queiroz

Back to top

1
likes
130
points
215
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter package to facilitate facial recognition and configure steps to perform validation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

animate_do, camera, camerawesome, equatable, flutter, google_mlkit_face_detection, lottie, path_provider

More

Packages that depend on animated_face_detection