m7_livelyness_detection 0.0.2 copy "m7_livelyness_detection: ^0.0.2" to clipboard
m7_livelyness_detection: ^0.0.2 copied to clipboard

A single function package to detect weather the face visible in the camera is a live face or not.

m7_livelyness_detection #

What is the Livelyness Detection? #

A single line flutter package that will help you detect weather the captured image is a live face or not.

Platform Support #

Android iOS MacOS Web Linux Windows
✔️ ✔️ ⏱️ ⏱️ ⏱️ ⏱️

Installation #

Flutter Setup

Add m7_livelyness_detection to your pubspec.yaml dependencies.

Using command-line
flutter pub add m7_livelyness_detection

Native Setup

iOS

iOS Setup

  1. Open the project in Xcode and set the deployment
  2. Open the ios/Runner/Info.plist file as Source Code.
  3. Add the below-mentioned code inside the <dict> tag.
  <key>NSCameraUsageDescription</key>
  <string>Camera Access for Scanning</string>
  <key>NSMicrophoneUsageDescription</key>
  <string>Microphone for playing instructions audio.</string>
  1. Open the ios/Runner/Podfile and uncomment the second line.
platform :ios, '14.0' # <---------- Uncomment this line
  1. Set the deployment target in the Xcode project
Screenshot 2023-01-02 at 11 03 17 AM
Android

Android Setup

  1. Open the example/android/app/build.gradle file and set the minSdkVersion as 21.

Example #

Nothing fancy just a single line function that will return a temporary path to the captured image.

Code

    final String? response =
        await M7LivelynessDetection.instance.detectLivelyness(
      context,
      config: M7DetectionConfig(
        steps: [
          M7LivelynessStepItem(
            step: M7LivelynessStep.blink,
            title: "Blink",
            isCompleted: false,
          ),
          M7LivelynessStepItem(
            step: M7LivelynessStep.smile,
            title: "Smile",
            isCompleted: false,
          ),
        ],
        startWithInfoScreen: true,
      ),
    );

Example Video

Contributors #

Contributors
Sagar Ghag
38
likes
0
pub points
85%
popularity

Publisher

unverified uploader

A single function package to detect weather the face visible in the camera is a live face or not.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

animate_do, camera, flutter, google_mlkit_face_detection, lottie, plugin_platform_interface

More

Packages that depend on m7_livelyness_detection