Skip to content

Learning Generalized Spoof Cues for FaceAnti-spoofing reimplementation in pytorch

Notifications You must be signed in to change notification settings

Podidiving/lgsc-for-fas-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LGSC-for-FAS pytorch

WORK IN PROGRESS

This repository is reimplementation of "LGSC-for-FAS" repository, which is implementation of "Learning Generalized Spoof Cues for FaceAnti-spoofing (LGSC)"

Code of this repository uses "pytorch" and "pytorch_lightning"

Train

There are 2 ways:

  1. Configure your own dataset, redefine val_dataloader & train_dataloader functions in pl_model.py
  2. Specify in configs/train_config.yml next variables: train_df - path to csv with train info. Each object should have target (1 for live, 0 for spoof) and path (relative path, see src/dataset to understand, how path is build), Also specify val_df (like train_df), path_root (absolute path to your data) and default_root_dir (path to store pytorch_lightning logs)

Note You can crop faces online with facenet-pytorch, just specify parameters in configs/train_config.yml

Then run python src/train.py -c configs/train_config

Infer

  1. Specify parameters in configs/infer_configs.yml
  2. Run src/infer.py

Citation

@inproceedings{
    feng2020deep,
    title={Learning Generalized Spoof Cues for Face Anti-spoofing},
    author={Haocheng Feng and Zhibin Hong and Haixiao Yue and Yang Chen and Keyao Wang and 
    Junyu Han and Jingtuo Liu and Errui Ding},
    year={2020},
    eprint={2005.03922},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

About

Learning Generalized Spoof Cues for FaceAnti-spoofing reimplementation in pytorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages