Classify spectrograms by fine-tuned pre-trained CNN models.
git clone [email protected]:monetjoe/ccmusic_eval.git
cd ccmusic_eval
conda create -n py311 python=3.11 -y
conda activate py311
pip install -r requirements.txt
python train.py --ds ccmusic-database/bel_canto --subset eval --data cqt --label singing_method --model squeezenet1_1 --wce True --mode 0
Args | Notes | Options | Type |
---|---|---|---|
--ds | The dataset on ModelScope to be evaluated | For examples: ccmusic-database/CNPM, ccmusic-database/bel_canto | string |
--subset | The subset of the dataset | For examples: default, eval | string |
--data | Input data colum of the dataset | For examples: mel, cqt, chroma | string |
--label | Label colum of the dataset | For examples: label, singing_method, gender | string |
--model | Select a CV backbone to train | Supported backbones | string |
--imgnet | ImageNet version the backbone was pretrained on | v1, v2 | string |
--mode | Training mode ID | 0=linear_probe, 1=full_finetune, 2=no_pretrain | int |
--bsz | Batch size | For examples: 1, 2, 4, 8, 16, 32, 64, 128..., default is 4 | int |
--eps | Epoch number | Default is 40 | int |
--wce | Whether to use weighted cross entropy | False, True | bool |
Param | Value | Range |
---|---|---|
iteration | 10 | train |
lr | 0.001 | optimizer |
momentum | 0.9 | optimizer |
optimizer | SGD | scheduler |
mode | min | scheduler |
factor | 0.1 | scheduler |
patience | 5 | scheduler |
verbose | True | scheduler |
threshold | lr | scheduler |
threshold_mode | rel | scheduler |
cooldown | 0 | scheduler |
min_lr | 0 | scheduler |
eps | 1e-08 | scheduler |
@article{Zhou-2025,
author = {Monan Zhou and Shenyang Xu and Zhaorui Liu and Zhaowen Wang and Feng Yu and Wei Li and Baoqiang Han},
title = {CCMusic: An Open and Diverse Database for Chinese Music Information Retrieval Research},
journal = {Transactions of the International Society for Music Information Retrieval},
volume = {8},
number = {1},
pages = {22--38},
month = {Mar},
year = {2025},
url = {https://doi.org/10.5334/tismir.194},
doi = {10.5334/tismir.194}
}