README.md 2.09 KB
Newer Older
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
1 2 3 4
This repository is based on the software Torch and allows to reproduce the results of the following paper:

---
@INPROCEEDINGS{Muckenhirn_IJCB_2017,
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
5 6 7 8
	author = {Muckenhirn, Hannah and Magimai.-Doss, Mathew and Marcel, S{\'{e}}bastien},
	title = {End-to-End Convolutional Neural Network-based Voice Presentation Attack Detection},
	booktitle = {International Joint Conference on Biometrics},
	year = {2017},
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
9
}
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
10

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
11 12 13 14 15 16
---

If you use this code and/or its results, please cite the paper.

# Torch Installation

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
17
To install Torch, follow the instructions given [here](http://torch.ch/docs/getting-started.html)
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
18 19 20 21 22 23
The experiments require two additional packages: `signal` and `sndfile`


# Running experiments


Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
24
## 1. Create data files
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
25
In order to run the experiments, you will need three bin files per data subset: one containing the audio data, one containing the targets (0 and 1s) and one containing the audio sample label (corresponding to the name of each file).
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
26

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
27
To create these three bin files, you will need to have two lists for each data subset: one containing the paths to the audio data of the real samples and the attacks respectively.
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
28

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
29
## 2. Train the CNN
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
30

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
The training is done with the script train.sh. 

When running this script, several parameters of the CNN should be specified:
-arch {cnnMLP, cnnSLP}
-nhu1 
-kW1 
-dW1 
-clNhu

as well as the name of the bin files previously created:
-trainData
-trainLabel
-trainVAD
-devData
-devLabel
-devVAD'

and the folder in which the outputs will be saved: -save

This folder will contain a log file, a file containing the error of the training set and a file containing the error of the development set. It will also contains the models trianed at each epoch. 

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
52
## 3. Forward development and evaluation sets
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
53

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
54
In order to compute the scores on the development and evaluation sets, you will first need to select which saved model to use. This should be done by selecting the one that achieves the lowest error rate on the development set. 
Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
55

Hannah MUCKENHIRN's avatar
Hannah MUCKENHIRN committed
56
Computing the scores is done with the script forward.lua. This will create one file, names "scores-dev" or "scores-eval", depending on the -type option.