File size: 3,663 Bytes
4b9346d
 
fe0b8ce
 
 
 
 
 
caa2baf
fe0b8ce
 
 
d4d769c
7ecd01a
eb9905a
 
4171d41
 
 
f2b614f
 
 
 
 
 
d4d769c
 
 
3e0cb79
eb9905a
 
5fac11f
059117d
8674b2f
5fac11f
 
 
 
 
 
 
 
 
 
 
 
6d0c046
5fac11f
 
 
6d0c046
5fac11f
 
 
6d0c046
5fac11f
 
 
c7e0d94
b830950
c7e0d94
eb9905a
f2b614f
eb9905a
1e8fc81
 
063c375
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
license: mit
datasets:
- ccmusic-database/music_genre
language:
- en
metrics:
- accuracy
pipeline_tag: audio-classification
tags:
- music
- art
---
# Intro
The music genre classification model is fine-tuned based on a pre-trained model from the computer vision (CV) domain, aiming to classify audio data into different genres. During the pre-training phase, the model learns rich feature representations using a large-scale dataset from computer vision tasks. Through transfer learning, these learned features are applied to the music genre classification task to enhance the model's performance on audio data. In the fine-tuning phase, an audio dataset containing 16 music genre categories is utilized. These audio samples are first transformed into spectrograms, converting the temporal audio signal into a two-dimensional representation in the time and frequency dimensions. The spectrogram representation captures the temporal evolution of different audio frequencies, providing the model with rich information about the audio content. Through fine-tuning, adjustments are made to the pre-trained model to meet the requirements of the music genre classification task. The model learns to extract features from spectrograms that are relevant to music genre, enabling accurate classification of audio samples. This process enables the model to recognize and infer music genres, such as rock, classical, pop, among others. By combining a pre-trained model from the computer vision domain with an audio task, this approach leverages cross-modal knowledge transfer, demonstrating the adaptability and effectiveness of pre-trained models across different domains.

## Demo
<https://huggingface.co/spaces/ccmusic-database/music-genre>

## Usage
```python
from modelscope import snapshot_download
model_dir = snapshot_download('ccmusic-database/music_genre')
```

## Maintenance
```bash
GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:ccmusic-database/music_genre
cd music_genre
```

## Results
<img src="https://www.modelscope.cn/api/v1/models/ccmusic-database/music_genre/repo?Revision=master&FilePath=.%2Fgenres_results.png&View=true">
A demo result of VGG19_BN fine-tuning:
<style>
  #pianos td {
    vertical-align: middle !important;
    text-align: center;
  }
  #pianos th {
    text-align: center;
  }
</style>
<table id="pianos">
    <tr>
        <th>Loss curve</th>
        <td><img src="https://www.modelscope.cn/api/v1/models/ccmusic-database/music_genre/repo?Revision=master&FilePath=.%2Fvgg19_bn_cqt%2Floss.jpg&View=true"></td>
    </tr>
    <tr>
        <th>Training and validation accuracy</th>
        <td><img src="https://www.modelscope.cn/api/v1/models/ccmusic-database/music_genre/repo?Revision=master&FilePath=.%2Fvgg19_bn_cqt%2Facc.jpg&View=true"></td>
    </tr>
    <tr>
        <th>Confusion matrix</th>
        <td><img src="https://www.modelscope.cn/api/v1/models/ccmusic-database/music_genre/repo?Revision=master&FilePath=.%2Fvgg19_bn_cqt%2Fmat.jpg&View=true"></td>
    </tr>
</table>

## Dataset
<https://huggingface.co/datasets/ccmusic-database/music_genre>

## Mirror
<https://www.modelscope.cn/models/ccmusic-database/music_genre>

## Evaluation
<https://github.com/monetjoe/ccmusic_eval>

## Cite
```bibtex
@dataset{zhaorui_liu_2021_5676893,
  author       = {Monan Zhou, Shenyang Xu, Zhaorui Liu, Zhaowen Wang, Feng Yu, Wei Li and Baoqiang Han},
  title        = {CCMusic: an Open and Diverse Database for Chinese and General Music Information Retrieval Research},
  month        = {mar},
  year         = {2024},
  publisher    = {HuggingFace},
  version      = {1.2},
  url          = {https://huggingface.co/ccmusic-database}
}
```