Improvements of Discriminative Feature Space Training for Anomalous Sound Detection in Unlabeled Conditions
- Make venv (
unlabledasd/venv)- python version was
3.10.10 python3 -m venv venvsource venv/bin/activatepip install -r requirements.txt
- python version was
- Download DCASE2023 and DCASE2024 data
- Modify the data structure as follows: (You can also use symbolic links)
<data_dir>/dcase2023/all/raw/bandsaw/train- ...
<data_dir>/dcase2023/all/raw/valve/test<data_dir>/dcase2024/all/raw/3DPrinter/train- ...
<data_dir>/dcase2024/all/raw/valve/test
- Add ground-truth information
- This process renames the filenames of the test set using ground-truth labels.
- Set
data_dirto<data_dir>in thepreprocess/add_gt_info.sh. cd preprocessand execute./add_gt_info.sh
-
The full shell script of the experiments is provided in the
jobs/exp -
exp1.sh,exp2.sh, andexp3_???.shcorrespond to Tables 1, 2, and 3, respectively. -
Set
data_dirin each shell script and execute it -
These shell scripts run experiments with five different seeds and several methods using a simple
forloop. If you want to parallelize the process or run it selectively, you can split theforloop. -
When you execute the shell scripts, the training will strat, and the results will be stored in
results/exp/<dcase>/<method>/<machine>/infer/version_epoch<epoch>/*_test_result.csvinfer/version_epoch_12_14_16is the result of an ensemble of anomaly scores for the 12, 14, and 16 epochshmean_officialofinfer/versoin_epoch<epoch>/*_test_result.csvis the official score of DCASE Task2 Challengehmean_officialis the harmonic mean of the AUC of the source domain (0_source_auc_all), the AUC of the target domain (0_target_auc_all), and the pAUC of both domains (0_all_pauc_all)
-
Before executing
exp3.sh, pseudo labels should be generated (see next section).
-
pseudoattr/pseudo_attr.shgenerates several types of pseudo-labels using a simpleforloop. If you want to parallelize the process or run it selectively, you can split theforloop. -
Some pseudo-labeling methods require some preparation. See
pseudoattr/README.mdfor more details. -
Here is a correspondence table between the names in the experiment and the names in the paper
Name@paper 2023 2024 N/A pattr_macdom_subloss_0256_4096 (exp3_NA23.sh) subloss_0256_4096 (exp1.sh) Class pattr_bic_pre_subloss_0256_4096 (exp3_PL.sh) pattr_bic_pre_subloss_0256_4096 (exp3_PL.sh) Triplet pattr_bic_triplet_subloss_0256_4096 (exp3_PL.sh) pattr_bic_triplet_subloss_0256_4096 (exp3_PL.sh) PANNs pattr_bic_panns_subloss_0256_4096 (exp3_PL.sh) pattr_bic_panns_subloss_0256_4096 (exp3_PL.sh) OpenL3 pattr_bic_openl3_subloss_0256_4096 (exp3_PL.sh) pattr_bic_openl3_subloss_0256_4096 (exp3_PL.sh) GT subloss_0256_4096 (exp1.sh) pattr_gt_subloss_0256_4096 (exp3_GT24.sh)
@article{fujimura2024improvements,
title={Improvements of Discriminative Feature Space Training for Anomalous Sound Detection in Unlabeled Conditions},
author={Fujimura, Takuya and Kuroyanagi, Ibuki and Toda, Tomoki},
journal={arXiv preprint arXiv:2409.09332},
year={2024}
}