Supported datasets:
- Beatles
- BRID
- GTZAN
- GTZAN Rhythm
- RWC Classical
- RWC Jazz
We use a custom Dataset
class based on mirdata
's, so we are able to load
original and augmented data. This class requires the data to be structured in
audio
and annotation
folders.
We provide a bash script that parse all the datasets (parse_datasets.sh
) to
the correct structure and infer the meter from the beat annotation data.
You can change the input values for the needed variables in the script
and then run it with ./parse_datasets.sh
. This will make
the data be in the correct location.
Once the datasets are in the correct format, we can also augment them. To do so, run the augment_dataset.py
script.
To augment all supported datasets to all meters:
python augment_dataset.py \
--data_home /path/to/datasets
To augment specific datasets to specific meters:
python augment_dataset.py \
--data_home /path/to/datasets \
--datasets gtzan beatles \
--target_aug 24
IMPORTANT your dataset name should match the folder name you chose when parsing the datasets, otherwise the script will break. We recommend keeping the folder names as "gtzan" (GTZAN), "beatles" (Beatles), "rwcc" (RWC Classical) and "rwcj" (RWC Jazz).
To create the splits shown in the figure above, just run
python create_splits.py \
--data_home /path/to/datasets \
--splits_home /path/to/output/splits
This will save your splits in the splits_home
folder.
- Make sure you have MATLAB installed
- Clone the bayesbeat GitHub repo
- Inside
bayesbeat_experiments/bayes_beat_training.m
file, replace thebase_path
variable (L46) to the location where you saved the repo in step 2 - Run it!
The BayesBeat inference is the same process, but you change the bayesbeat
path on L41 of the inference.m
file and run it.
To train the TCN, run the tcn.py
script providing the path to your dataset
folder and the experiment you wish to reproduce (baseline
,
augmented_sampled
or augmented_full
)
python run_tcn_experiment.py \
--data_home /path/to/datasets \
--splits_home /path/to/splits \
--experiment exp
This will train and test the TCN in both BRID and the regular test set.