Giter Club home page Giter Club logo

lanit-summer2022-face_antispoofing's Introduction

face-antispoofing-summer-2022

Стек технологий:

  • pytorch

  • sklearn

  • opencv

  • wandb

Facial anti-spoofing is the task of preventing false facial verification by using a photo, video, mask or a different substitute for an authorized person’s face. Some examples of attacks:

Print attack: The attacker uses someone’s photo. The image is printed or displayed on a digital device.

Replay/video attack: A more sophisticated way to trick the system, which usually requires a looped video of a victim’s face. This approach ensures behaviour and facial movements to look more ‘natural’ compared to holding someone’s photo.

Frameworks: Python, pytorch, wandb, opencv, numpy, pandas, sklearn

The best results:

ClassicML models on test dataset: SVM - 0.63, Random Forest - 0.57, MLP - 0.53

PytorchNet on test dataset: 0.78

PytorchNet on real data: 0.18

examples from real data:

image

  1. run_dataset.ipnb getting local binary patterns(lbp) features for the datasets made by https://github.com/hairymax/Face-AntiSpoofing:

https://drive.google.com/file/d/1uBH6JYkAgy1HHMxTTP39XdZOMtHWc2qG/view?usp=sharing

https://drive.google.com/file/d/1uATAPZSwJBy5oj6AYLqQrEsy0dhJrI0Y/view?usp=sharing

You need to load this files into your google drive

  1. lbp features calculated by feature_extract.py from https://github.com/Elroborn/Face-anti-spoofing-based-on-color-texture-analysis

  2. spoofing_classicML.ipnb build classic models from sklearn using features from step 2

  3. classicML_metrics.ipnb calculate metrics and confusion matrix for best models from step 3

  4. ClassicML dont't achieve good results, so there is pytorch neural network in AntospoofingNet.ipynb using the same features

  5. to get frames from video - run fet_frames_from_vid.ipynb

  6. to test or to make prediction on your folder with images you can use AntispoofingNet_demo.ipynb

Features:

zip file for data_128: features_128.zip

zip file for data_256: features_256.zip

Classic ML models results:

classicML_metrics.ipnb

classicML_results.zip

feel free to contact with me:

https://t.me/abletobetable

[email protected]

lanit-summer2022-face_antispoofing's People

Contributors

abletobetable avatar

Watchers

 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.