Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8e3127c

Browse files
authored
Merge pull request #29 from gan-police/path-extraction
Path extraction feature and bug fixes
2 parents 0b0013d + f9df3e2 commit 8e3127c

30 files changed

+510
-81
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ Keep in mind that each experiment will be run for the several different seeds (d
127127

128128
Important: Set the `data_path`, `save_path`, `limit_train`, `cross_limit`, `seconds` the same as in `scripts/prepare_ljspeech.py`.
129129

130+
Using a cluster with slurm installed an examplary run for training the DCNN with a sym5 could be achieved by using the given config and executing
131+
132+
```bash
133+
sbatch scripts/train.sh packets fbmelgan 256 sym5 2.0 False 320 1
134+
```
135+
130136
### Evaluating the Classifier
131137

132138
#### Calculating accuracy and equal error rate (EER)
@@ -146,6 +152,18 @@ log_dir/plots/some_model_config_[used-sources]x2500_target-01_integrated_gradien
146152
To plot the results, configure the variables in `plot_attribution` of `src/audiofakedetect/integrated_gradients.py` and execute it using `scripts/attribution.py`.
147153

148154

155+
#### Example Misclassifications per Model
156+
157+
It is possible to extract misclassified audio fakes by comparing the correct classifications of different models. This can be done by using the `"get_details": [True]` config in your `gridsearch_config.py`. Set `"only_testing": [True]` as well if you have trained your models already. Using this configuration each test loop for each individual experiment will produce an output numpy file in the log dir with a file name starting with `true_ind...`.
158+
159+
To compare to experiment results (e.g. of a model with dilation and one without), use the `scripts/analyze_model_diffs.py` script to extract 10 sample audios which are correctly classified by the first given model and incorrectly classified by the second given model. You might need to adjust the corresponding file paths in the script to point to the result from the testing process and also specify a save path for the audios.
160+
161+
In the following we provide some examplary audios that were correctly classified as deep fake by our DCNN and misclassified (as real) by the same model without dilation:
162+
- [B_melgan_LJ016-0433_gen_4.wav](fingerprints/classification_examples/B_melgan_LJ016-0433_gen_4.wav)
163+
- [D_mbmelgan_LJ014-0293_gen_2.wav](fingerprints/classification_examples/D_mbmelgan_LJ014-0293_gen_2.wav)
164+
- [H_lmelgan_LJ002-0228_gen_10.wav](fingerprints/classification_examples/H_lmelgan_LJ002-0228_gen_10.wav)
165+
- [K_lbigvgan_LJ021-0060_generated_6.wav](fingerprints/classification_examples/K_lbigvgan_LJ021-0060_generated_6.wav)
166+
149167
## Building the documentation
150168
To build the documentation move into `docs/` and install the requirements with
151169
```bash
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)