Giter Club home page Giter Club logo

liveness-detection's Introduction

liveness-detection

liveness detection with opencv 人脸识别 活体检测


中文版README


Operating Environment

Python 3.8.2
opencv-python 4.2.0.34
tensorflow 2.3.0
Keras 2.3.1
numpy 1.18.2

How To Use


git clone https://github.com/ZhaoHengheng123-star/liveness-detection.git

1. Create training datasets


First pick up the phone and take a selfie for about 30 seconds (depending on the number of training data sets you want), walk around and show various micro-expressions, called real.mp4

Use the computer camera to shot the phone while the phone is playing the real.mp4, or mp4 is shot directly with the computer camera, during which various micro-expressions are displayed and the distance is constantly changed, also in about 30 seconds, and it is called fake.mp4

Put the two videos above in videos/ folder.

2. Detect and extract ROI from the dataset


Run the command separately:

python gather.py --input videos/fake.mp4 --output dataset/fake --detector face_detector --skip 1
python gather.py --input videos/real.mov --output dataset/real --detector face_detector --skip 4

3. Training in vivo detector


python train.py --dataset dataset --model liveness.model --le le.pickle

4. Run


python liveness.py --model liveness.model --le le.pickle --detector face_detector



liveness-detection's People

Contributors

rszhh avatar

Stargazers

Qi Zhenyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.