m7_livelyness_detection 0.0.2 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
- Open the project in Xcode and set the deployment
- Open the
ios/Runner/Info.plist
file asSource Code
. - 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>
- Open the
ios/Runner/Podfile
and uncomment the second line.
platform :ios, '14.0' # <---------- Uncomment this line
- Set the deployment target in the Xcode project
Android
Android Setup
- Open the
example/android/app/build.gradle
file and set theminSdkVersion
as21
.
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 |