Giter VIP home page Giter VIP logo

chester-w-xie / pc-darts-anti-spoofing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eurecom-asp/pc-darts-anti-spoofing

0.0 0.0 0.0 26.2 MB

This repository includes the code to reproduce our paper Partially-Connected Differentiable Architecture Search for Deepfake and Spoofing Detection" (https://arxiv.org/abs/2104.03123) to appear in INTERSPEECH '21

Python 95.08% Shell 4.92%

pc-darts-anti-spoofing's Introduction

pc-darts-anti-spoofing

This repository contains implementation of our paper Partially-Connected Differentiable Architecture Search for Deepfake and Spoofing Detection accepted to INTERSPEECH 2021.

Dependencies

pip install -r requirements.txt

Dataset

The ASVspoof2019 database can be downloaded from here

The extracted data should be orginased as:

  • LA/
    • ASVspoof2019_LA_dev/flac/...
    • ASVspoof2019_LA_eval/flac/...
    • ASVspoof2019_LA_train/flac/...
    • ASVspoof2019.LA.cm.dev.trl.txt
    • ASVspoof2019.LA.cm.eval.trl.txt
    • ASVspoof2019.LA.cm.train.trn.txt
    • ASVspoof2019.LA.cm.train.trn_h.txt (uploaded in /split_protocols)
    • ASVspoof2019.LA.cm.train.trn_t.txt (uploaded in /split_protocols)
    • ...

For convience, you can change the codes' default --data argument to '/path/to/your/LA', instead of typing it for each run.

Usage

Architecture Search

To search with 4 layers with 16 initial channels, and with masked LFCC feature:

python train_search.py --layers=4 --init_channels=16 --frontend=lfcc --mask

Train from Scratch

To train with the reported best architecture in the paper, using 4 layers, 16 initial channels and masked LFCC feature:

python train_model.py --arch=ARCH --layers=4 --init_channels=16 --frontend=lfcc --mask

replace ARCH with "Genotype(normal=[('sep_conv_5x5', 0), ('sep_conv_5x5', 1), ('sep_conv_3x3', 2), ('dil_conv_5x5', 0), ('avg_pool_3x3', 2), ('max_pool_3x3', 3), ('avg_pool_3x3', 2), ('avg_pool_3x3', 4)], normal_concat=range(2, 6), reduce=[('sep_conv_5x5', 1), ('sep_conv_3x3', 0), ('dil_conv_3x3', 2), ('avg_pool_3x3', 0), ('dil_conv_5x5', 2), ('sep_conv_3x3', 3), ('dil_conv_3x3', 2), ('avg_pool_3x3', 4)], reduce_concat=range(2, 6))"

Evaluate

To evaluate the saved model using the same architecture in train from scratch on LA Evaluation partition:

python evaluate.py --arch=ARCH --model=/path/to/your/saved/models/epoch_x.pth --layers=4 --init_channels=16 --frontend=lfcc

also replace ARCH with the corresponding architecture.

Citation

If you use this repository, please consider citing:

(to appear)

@inproceedings{ge2021,
  author= {Ge, Wanying and Panariello, Michele and Patino, Jose and Todisco, Massimiliano and Evans, Nicholas},
  title= {{Partially-Connected Differentiable Architecture Search for Deepfake and Spoofing Detection}},
  booktitle={{Interspeech 2021, 22nd Annual Conference of the International Speech Communication Association}},
  year= {2021},
  month= {August},
  address = {Brno, Czech Republic}
}

Acknowledgement

Codes are based on the implementations of AutoSpeech, PC-DARTS and project-NN-Pytorch-scripts.

pc-darts-anti-spoofing's People

Contributors

gewanying avatar eurecom-asp 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.