Need help with ChaLearn_liveness_challenge?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

AlexanderParkin
249 Stars 58 Forks MIT License 19 Commits 15 Opened issues

Description

ChaLearn Face Anti-spoofing Attack Detection [email protected]

Services available

!
?

Need anything else?

Contributors list

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 [email protected]=10e-4 | Test [email protected]=10e-4 | |:-----:|:------:|:-----:|:-----:|:-----:|:------:|:-------------------:|:--------------------:| |:heavycheckmark:| | | | | | 0.9943 | | | | :heavycheckmark: | | | | | 0.9987 | | | | | :heavycheckmark: | | | | 0.9870 | | | | | | :heavycheckmark: | | | 0.9963 | | | | | | | :heavycheckmark: | | 0.9933 | | | :heavycheckmark: | | :heavycheckmark: | | | | 0.9963 | | | :heavycheckmark: | | :heavycheckmark: | :heavycheckmark: | | | 0.9983 | | | :heavycheckmark: | | :heavycheckmark: | :heavycheckmark: | | :heavycheckmark: | 0.9997 | | | :heavycheckmark: | | :heavycheckmark: | :heavycheckmark: | :heavycheckmark: | :heavycheckmark: | 1.0000 | | | | :heavycheckmark: | :heavycheckmark: | :heavycheckmark: | :heavycheckmark: | :heavycheckmark: | 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| |:---:|:------------:|:-------------:|:--------:|:---------:| |exp12stage|resnet caffe34|CASIA, sphere loss|MCS2018|Google Drive| |exp2|resnet caffe34|Gender classifier on AFAD-Lite|./attributestrainer|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 dataroot path in ```datasets/initdataloader.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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.