Application of Deep Co-Training for audio tagging on multiple audio dataset.
git clone https://github.com/leocances/semi-supervised.git
cd semi-supervised
conda env create -f environement.ym
conda activate ssl
pip install -e .
conda activate dct
python standalone/full_supervised/full_supervised.py --from-config DCT/util/config/ubs8k/100_supervised.yml
The directory standalone/
contains the scrpits to execute the different semi-supervised methods and the usual supervised approach. Each approach has it own working directory which contain the python scripts.
The handling of running arguments is done using hydra and the configuration files can be found in the directory config/
. There is one configuration file for each dataset and methods.
conda activate ssl
cd semi-supervised/standalone/supervised
python supervised.py -cn ../../config/supervised/speechcommand.yaml
You can override the parameters from the configuration file by doing the following, allowing you to change the model to use, training parameters or some augmentation parameters. please read the configuration file for more detail.
python supervised.py -cn ../../config/supervised/speechcommand.yaml model.model=resnet50
I am currently trying to make a main script from which it will possible to train and use the models easily. This documentation is more for my personnal use and is not exaustif yet. It is better to use directly the proper training script with the conrresponding configuration file.
-
train
- --model: The model architecture to use. See Available models
- --dataset: The dataset you want to use for the training. See Install datasets
- --method: The learning method you want to use for the training. See Available methods
- [hydra-override]
- Exemple
python run_ssl train --dataset speechcommand --model wideresnet28_2 --method mean-teacher [hydra-override-args ...]
-
inference
- --model: The model architecture to use. See Available models
- --dataset: The dataset used to train the model. See Install datasets
- --method: The learning method used for the training. See Available methods
- -w | --weights: The path to the weight of the model. If left empty will use the latest file available
- -f | --file: The path to the file that will be fed to the model
- -o | --output: The output expected from {logits | softmax | sigmoid | pred}
- --cuda: Use the GPU if this flag is added
- Exemple
python run_ssl inference \ --dataset ComParE2021-PRS \ -o softmax \ -f ../datasets/ComParE2021-PRS/dist/devel_00001.wav \ -w ../model_save/ComParE2021-PRS/supervised/wideresnet28_2/wideresnet28_2__0.003-lr_1.0-sr_50000-e_32-bs_1234-seed.best
-
cross-validation
- WIP
WIP
WIP
WIP