Introduction

This is a package for face detection, liveness check, and face matching.

Features

  1. Face Detector
  2. Liveness Check
  3. Face Recognition
  4. Face Matching

Usage

Add jniLib folder in android/app/src/main/

Download files from the given drive link and paste it in jniLib folder

https://drive.google.com/drive/folders/1ZW5lrK_d8iBjzz8Accj1mc1OFFX1D8Fy?usp=share_link

Download mobilefacenet.tflitte file from the link and paste in root "assets" folder

https://drive.google.com/file/d/13vQyFe_kVdO_cpvRjQupEy643DjXQICr/view?usp=share_link

Add mobilefacenet.tflite file declaration in pubspec.yaml

assets:
- assets/mobilefacenet.tflite

Paste this line on the top of main function in main.dart file

List<CameraDescription> cameras = [];

Paste this code in the file where you want to use face detection


import 'package:chromepay_facematch/chromepay_facematch.dart';
import 'package:camera/camera.dart';

late XFile? file=null;

@override
void initState(){
  super.initState();
  getAsync();
}
void getAsync() async{
  cameras = await availableCameras();
  setupServices();
}

bool isload=false;
void FaceScanner() async {
  final result = await Navigator.push(
    context,
    MaterialPageRoute(
      builder: (
          BuildContext context) =>
          ScanFace(token: token), // Enter the token you received from Chromepay
    ),
  );

  if (result != null) {
    file = result;
    isload =true;
    setState(() {
    });
  }
}