Skip to content

Check whether the given image is a real or fake face (liveness) and compare between 2 faces which is expected to have a high of accuracy and light weight.

Notifications You must be signed in to change notification settings

febriarief/python-ekyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python eKYC

Overview

The main goal of this project is to check whether the given image is a real or fake face (liveness) and compare between 2 faces which is expected to have a high of accuracy and light weight. This repo is inspired by Silent Face Anti Spoofing and uses some of the file and code in it, but we use our own custom model.

Pre-processing

  • Automatically align facial landmarks before feeding them to the model for testing. auto align face landmark

Result

  • Output after model testing, returns "Real" or "Fake" with a confidence score. auto align face landmark

Installation

Conda
conda env create -f environment.yml

Activate venv:

conda activate python-ekyc
Python

Tested on python 3.8

pip install -r requirements.txt

Usage

# Liveness Detection

Place your image in sample folder.

Command to run:

python main.py --filename suzuka-nakamoto.jpg

Output:

Face detected
Image 'suzuka-nakamoto.jpg' is Real Face.
Score: 1.39.
Blur score: 345.25
Elapsed time 2.80 s

Todos:

  • Auto rotate image
  • Align face
  • Detect spoof image/face
  • Compare between 2 faces

Limitations

  • The images provided must have a 3:4 (w:h) ratio.
  • If the face is rotated, e.g 90 degrees, the depiction of facial landmarks is invalid.

Credits

About

Check whether the given image is a real or fake face (liveness) and compare between 2 faces which is expected to have a high of accuracy and light weight.

Topics

Resources

Stars

Watchers

Forks

Languages