GithubHelp home page GithubHelp logo

skjack / chalearn_liveness_challenge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexanderparkin/chalearn_liveness_challenge

0.0 1.0 0.0 25.4 MB

ChaLearn Face Anti-spoofing Attack Detection Challenge@CVPR2019

License: MIT License

Python 92.31% TeX 5.33% Shell 2.36%

chalearn_liveness_challenge's Introduction

Solution for ChaLearn Face Anti-spoofing Attack Detection Challenge @ CVPR2019 by a.parkin (VisionLabs)

Alt text

Our method uses a modified network architecture in [1]. As shown on image, the RGB, Depth and IR inputs are processed by separate streams followed by the concatenation and fully-connected layers. Differently from [1] we use aggregation blocks (Agg res2, ...) to aggregate outputs from multiple layers of the network. We pre-train network weights on four different tasks for face recognition and gender recognition. We then fine- tune these networks separately on the training set of the CASIA-SURF face anti-spoofing dataset. To increase the robustness to various attacks, we ensemble networks trained on three training folds and with two initial seeds. Results of our models evaluated separately and in combination are illustrated in table.

NN1 NN1a NN2 NN3 NN4 seed Val trp@fpr=10e-4 Test trp@fpr=10e-4
✔️ 0.9943
✔️ 0.9987
✔️ 0.9870
✔️ 0.9963
✔️ 0.9933
✔️ ✔️ 0.9963
✔️ ✔️ ✔️ 0.9983
✔️ ✔️ ✔️ ✔️ 0.9997
✔️ ✔️ ✔️ ✔️ ✔️ 1.0000
✔️ ✔️ ✔️ ✔️ ✔️ 1.0000 0.9988

References

[1] Shifeng Zhang, Xiaobo Wang, Ajian Liu, Chenxu Zhao, Jun Wan, Ser- gio Escalera, Hailin Shi, Zezheng Wang, Stan Z. Li, ”CASIA-SURF: A Dataset and Benchmark for Large-scale Multi-modal Face Anti-spoofing”, arXiv, 2018.

Environment

Сreating the conda environment and installing the required libraries

conda create --name python3 --file spec-file.txt;
conda activate python3;
pip install -r requirements.txt

Train

Used pretrained models for face or gender recognition

Exp. Name Model architecture Train description Architecture Weights
exp1_2stage resnet caffe34 CASIA, sphere loss MCS2018 Google Drive
exp2 resnet caffe34 Gender classifier on AFAD-Lite ./attributes_trainer Google Drive
exp3b IR50 MSCeleb, arcface face.evoLVe.PyTorch Google Drive
exp3c IR50 asia(private) dataset, arcface face.evoLVe.PyTorch Google Drive

Step 1 (can be skipped)

Download all pretrained models (Google Drive) and challenge train/val/test data

Step 2 (can be skipped)

Download AFAD-Lite and train a model for gender recognition task

Step 3 (can be skipped)

Train models:

  • exp1
  • exp2
  • exp3b
  • exp3c

or run train.sh

Inference

Step 1 (can be skipped)

Step 1.1

Change data_root path in datasets/init_dataloader.py:23

Step 1.2

Run all prepaired models from data/opts/ and use inference.py or inference.sh

Step 2

ensemble all results

python ensemble.py

chalearn_liveness_challenge's People

Contributors

alexanderparkin avatar

Watchers

James Cloos 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.