Make sure that your python version >= 3.10
Run commands in evaluate_script.sh
bash evaluate_script.shAlso, if you want to install data to check metrics on LA part of ASVspoof2019 dataset, please run prep_script.sh
The commands in file prep_script.sh are:
bash prep_script.shOtherwise, you have to specify protocols file and dir with audios. For example, to get results on train part of dataset with rawnet2-s3, you can run:
python test.py +resume="default_test_model/rawnet2-s3-50.pth" data.test.datasets.0.args.wav_dir="data/LA/ASVspoof2019_LA_train/flac" data.test.datasets.0.args.txt_path="data/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.train.trn.txt" test_settings.skip_test=FalseYou will get metrics for test part of dataset and also probabilities for files in audio_dir (test_settings.audio_dir="test_data")
If you want to check my LCNN-LFCC model:
python test.py --config-name="config_lcnn_lfcc.yaml" +resume="default_test_model/lcnn-lfcc-10.pth" test_settings.skip_test=FalseIf you want to check RawNet2-S1.
python test.py +resume="default_test_model/rawnet2-s1-50.pth" test_settings.skip_test=FalseIf you want to check RawNet2-S3.
python test.py +resume="default_test_model/rawnet2-s3-50.pth" test_settings.skip_test=False test_settings.audio_dir="test_data"If you want to get metrics on train (or dev, if you change arguments) part of dataset, you can this commands:
python test.py +resume="default_test_model/rawnet2-s1-50.pth" data.test.datasets.0.args.wav_dir="data/LA/ASVspoof2019_LA_train/flac" data.test.datasets.0.args.txt_path="data/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.train.trn.txt" test_settings.skip_test=False python test.py +resume="default_test_model/rawnet2-s3-50.pth" data.test.datasets.0.args.wav_dir="data/LA/ASVspoof2019_LA_train/flac" data.test.datasets.0.args.txt_path="data/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.train.trn.txt" test_settings.skip_test=False python test.py --config-name="config_lcnn_lfcc.yaml" +resume="default_test_model/lcnn-lfcc-10.pth" data.test.datasets.0.args.wav_dir="data/LA/ASVspoof2019_LA_train/flac" data.test.datasets.0.args.txt_path="data/LA/ASVspoof2019_LA_cm_protocols/ASVspoof2019.LA.cm.train.trn.txt" test_settings.skip_test=FalseTo prepare data, run:
pip install -r requirements.txt
bash prep_script.shTo reproduce my final RawNet2 model, train: src/configs/config_rawnet2.yaml:
python train.pyIf you want to reproduce LCNN, train: src/configs/config_lcnn_lfcc.yaml:
python train.py --config-name="config_lcnn_lfcc.yaml"If you want to reproduce RawNet2-S3 model, train: src/configs/config_rawnet2.yaml with s3 arguments:
python train.py +arch.args.s3=True trainer.mixed_precision=False