File size: 3,595 Bytes
e613f5b
 
 
43fa129
33d125c
43fa129
 
b50e301
e0aa320
43fa129
9aacea7
43fa129
33d125c
e0aa320
43fa129
 
9aacea7
43fa129
33d125c
43fa129
 
 
9aacea7
 
 
 
 
 
 
 
 
 
 
43fa129
9aacea7
43fa129
 
 
9aacea7
43fa129
 
 
9aacea7
43fa129
 
 
9aacea7
43fa129
 
 
9aacea7
43fa129
 
9aacea7
43fa129
 
9aacea7
43fa129
 
9aacea7
43fa129
bf1729f
1229828
1df7d97
 
42efed7
 
 
1df7d97
42efed7
1df7d97
 
43fa129
 
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
---

license: mit
---


# Intro
The Chinese National Pentatonic Mode Recognition Model is trained on the Chinese National Pentatonic Mode Dataset, which combines manual annotation with computational analysis. This dataset collects and annotates audio files representing the five primary tonal modes in traditional Chinese music: Gong, Shang, Jiao, Zhi, and Yu (covering five-tone, six-tone, and seven-tone scales). Detailed annotations are provided for these modes, and an in-depth analysis of the methods for identifying Chinese ethnic five-tone modes is presented. The model employs feature extraction, spectral analysis, and pattern recognition techniques to efficiently and accurately identify and classify the five-tone modes in the music. This model's application not only facilitates the digital preservation of ethnic music but also offers robust data support and a technical framework for the analysis and retrieval of ethnic music features.

## Demo (inference code)
<https://huggingface.co/spaces/ccmusic-database/CNPM>

## Usage
```python

from huggingface_hub import snapshot_download

model_dir = snapshot_download("ccmusic-database/CNPM")

```

## Maintenance
```bash

GIT_LFS_SKIP_SMUDGE=1 git clone git@hf.co:ccmusic-database/CNPM

cd CNPM

```

## Results
|      Backbone      | Size(M) |     Mel     |             CQT             |   Chroma    |
| :----------------: | :-----: | :---------: | :-------------------------: | :---------: |
|      vit_l_32      |  306.5  |    0.680    |            0.769            |    0.399    |
|      vit_l_16      |  304.3  | **_0.823_** | [**_0.859_**](#best-result) | **_0.549_** |
|                    |         |             |                             |             |
|      vgg11_bn      |  132.9  | **_0.807_** |         **_0.843_**         | **_0.609_** |

|   regnet_y_16gf    |  83.6   |    0.590    |            0.832            |    0.535    |

|  wide_resnet50_2   |  68.9   |    0.694    |            0.757            |    0.531    |

|      alexnet       |  61.1   |    0.742    |            0.744            |    0.542    |

| shufflenet_v2_x2_0 |   7.4   |    0.473    |            0.720            |    0.266    |

### Best result
<table>
    <tr>

        <th>Loss curve</th>

        <td><img src="https://www.modelscope.cn/models/ccmusic-database/CNPM/resolve/master/vit_l_16_cqt_2024-12-03_12-31-17/loss.jpg"></td>

    </tr>

    <tr>

        <th>Training and validation accuracy</th>

        <td><img src="https://www.modelscope.cn/models/ccmusic-database/CNPM/resolve/master/vit_l_16_cqt_2024-12-03_12-31-17/acc.jpg"></td>

    </tr>

    <tr>

        <th>Confusion matrix</th>

        <td><img src="https://www.modelscope.cn/models/ccmusic-database/CNPM/resolve/master/vit_l_16_cqt_2024-12-03_12-31-17/mat.jpg"></td>

    </tr>

</table>


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

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

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

## Cite
```bibtex

@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}

}

```