George
commited on
Commit
•
bf74925
1
Parent(s):
f17c6ac
upl base codes
Browse files- .gitignore +2 -0
- README.md +115 -0
- data/labels.zip +3 -0
- song_structure.py +81 -0
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
rename.sh
|
2 |
+
test.py
|
README.md
CHANGED
@@ -1,3 +1,118 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
task_categories:
|
4 |
+
- mir
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
tags:
|
8 |
+
- music
|
9 |
+
- art
|
10 |
+
pretty_name: Song Structure Annotation Database
|
11 |
+
size_categories:
|
12 |
+
- n<1K
|
13 |
---
|
14 |
+
|
15 |
+
## Dataset Description
|
16 |
+
- **Homepage:** <https://ccmusic-database.github.io>
|
17 |
+
- **Repository:** <https://huggingface.co/datasets/CCMUSIC/song_structure>
|
18 |
+
- **Paper:** <https://doi.org/10.5281/zenodo.5676893>
|
19 |
+
- **Leaderboard:** <https://ccmusic-database.github.io/team.html>
|
20 |
+
- **Point of Contact:** N/A
|
21 |
+
|
22 |
+
### Dataset Summary
|
23 |
+
This database contains 300 pop songs (.mp3 format, downloaded from NetEase Cloud Music), as well as a structure annotation file (.txt format) for each song. The song structure is labeled as follows: intro, chorus, verse, pre-chorus, post-chorus, bridge, ending.
|
24 |
+
|
25 |
+
### Supported Tasks and Leaderboards
|
26 |
+
mir
|
27 |
+
|
28 |
+
### Languages
|
29 |
+
Chinese, English
|
30 |
+
|
31 |
+
## Dataset Structure
|
32 |
+
### Data Instances
|
33 |
+
.wav, .txt
|
34 |
+
|
35 |
+
### Data Fields
|
36 |
+
```
|
37 |
+
intro, chorus, verse, pre-chorus, post-chorus, bridge, ending
|
38 |
+
```
|
39 |
+
|
40 |
+
### Data Splits
|
41 |
+
train, valid, test
|
42 |
+
|
43 |
+
## Dataset Creation
|
44 |
+
### Curation Rationale
|
45 |
+
Lack of a dataset for Song Structure
|
46 |
+
|
47 |
+
### Source Data
|
48 |
+
#### Initial Data Collection and Normalization
|
49 |
+
Zhaorui Liu, Monan Zhou
|
50 |
+
|
51 |
+
#### Who are the source language producers?
|
52 |
+
Students from CCMUSIC
|
53 |
+
|
54 |
+
### Annotations
|
55 |
+
#### Annotation process
|
56 |
+
Students from CCMUSIC collected 300 pop songs, as well as a structure annotation file for each song
|
57 |
+
|
58 |
+
#### Who are the annotators?
|
59 |
+
Students from CCMUSIC
|
60 |
+
|
61 |
+
### Personal and Sensitive Information
|
62 |
+
Due to copyright issues with the original music, only features of audios by frame are provided in the dataset
|
63 |
+
|
64 |
+
## Considerations for Using the Data
|
65 |
+
### Social Impact of Dataset
|
66 |
+
Promoting the development of AI music industry
|
67 |
+
|
68 |
+
### Discussion of Biases
|
69 |
+
Only for mp3
|
70 |
+
|
71 |
+
### Other Known Limitations
|
72 |
+
Most are Chinese songs
|
73 |
+
|
74 |
+
## Additional Information
|
75 |
+
### Dataset Curators
|
76 |
+
Zijin Li
|
77 |
+
|
78 |
+
### Licensing Information
|
79 |
+
```
|
80 |
+
MIT License
|
81 |
+
|
82 |
+
Copyright (c) 2023 CCMUSIC
|
83 |
+
|
84 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
85 |
+
of this software and associated documentation files (the "Software"), to deal
|
86 |
+
in the Software without restriction, including without limitation the rights
|
87 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
88 |
+
copies of the Software, and to permit persons to whom the Software is
|
89 |
+
furnished to do so, subject to the following conditions:
|
90 |
+
|
91 |
+
The above copyright notice and this permission notice shall be included in all
|
92 |
+
copies or substantial portions of the Software.
|
93 |
+
|
94 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
95 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
96 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
97 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
98 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
99 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
100 |
+
SOFTWARE.
|
101 |
+
```
|
102 |
+
|
103 |
+
### Citation Information
|
104 |
+
```
|
105 |
+
@dataset{zhaorui_liu_2021_5676893,
|
106 |
+
author = {Zhaorui Liu, Monan Zhou, Shenyang Xu and Zijin Li},
|
107 |
+
title = {{Music Data Sharing Platform for Computational Musicology Research (CCMUSIC DATASET)}},
|
108 |
+
month = nov,
|
109 |
+
year = 2021,
|
110 |
+
publisher = {Zenodo},
|
111 |
+
version = {1.1},
|
112 |
+
doi = {10.5281/zenodo.5676893},
|
113 |
+
url = {https://doi.org/10.5281/zenodo.5676893}
|
114 |
+
}
|
115 |
+
```
|
116 |
+
|
117 |
+
### Contributions
|
118 |
+
Provide a dataset for Song Structure
|
data/labels.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:adb8198ac4099b50709ee0f36567a8213ce6e265a8a0b02a2fadf91e6ed165da
|
3 |
+
size 111232
|
song_structure.py
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import datasets
|
3 |
+
from datasets.tasks import AudioClassification
|
4 |
+
|
5 |
+
|
6 |
+
# Once upload a new piano brand, please register its name here
|
7 |
+
_NAMES = ["intro", "chorus", "verse", "pre-chorus", "post-chorus", "bridge"]
|
8 |
+
|
9 |
+
_DBNAME = os.path.basename(__file__).split('.')[0]
|
10 |
+
|
11 |
+
_HOMEPAGE = "https://huggingface.co/datasets/ccmusic-database/" + _DBNAME
|
12 |
+
|
13 |
+
_CITATION = """\
|
14 |
+
@dataset{zhaorui_liu_2021_5676893,
|
15 |
+
author = {Zhaorui Liu, Monan Zhou, Shenyang Xu and Zijin Li},
|
16 |
+
title = {{Music Data Sharing Platform for Computational Musicology Research (CCMUSIC DATASET)}},
|
17 |
+
month = nov,
|
18 |
+
year = 2021,
|
19 |
+
publisher = {Zenodo},
|
20 |
+
version = {1.1},
|
21 |
+
doi = {10.5281/zenodo.5676893},
|
22 |
+
url = {https://doi.org/10.5281/zenodo.5676893}
|
23 |
+
}
|
24 |
+
"""
|
25 |
+
|
26 |
+
_DESCRIPTION = """\
|
27 |
+
This database contains 300 pop songs (.mp3 format, downloaded from NetEase Cloud Music),
|
28 |
+
as well as a structure annotation file (.txt format) for each song.
|
29 |
+
The song structure is labeled as follows:
|
30 |
+
intro, chorus, verse, pre-chorus, post-chorus, bridge, ending.
|
31 |
+
"""
|
32 |
+
|
33 |
+
_URL = _HOMEPAGE + "/resolve/main/data/labels.zip"
|
34 |
+
|
35 |
+
|
36 |
+
class piano_sound_quality(datasets.GeneratorBasedBuilder):
|
37 |
+
|
38 |
+
def _info(self):
|
39 |
+
return datasets.DatasetInfo(
|
40 |
+
description=_DESCRIPTION,
|
41 |
+
features=datasets.Features(
|
42 |
+
{
|
43 |
+
"time": datasets.Value('time32'),
|
44 |
+
"audio": datasets.Value('binary'),
|
45 |
+
"label": datasets.features.ClassLabel(names=_NAMES),
|
46 |
+
}
|
47 |
+
),
|
48 |
+
supervised_keys=("time", "label"),
|
49 |
+
homepage=_HOMEPAGE,
|
50 |
+
license="mit",
|
51 |
+
citation=_CITATION,
|
52 |
+
task_templates=[
|
53 |
+
AudioClassification(
|
54 |
+
task="audio-classification",
|
55 |
+
audio_column="time",
|
56 |
+
label_column="label",
|
57 |
+
)
|
58 |
+
],
|
59 |
+
)
|
60 |
+
|
61 |
+
def _split_generators(self, dl_manager):
|
62 |
+
data_files = dl_manager.download_and_extract(_URL)
|
63 |
+
|
64 |
+
return [
|
65 |
+
datasets.SplitGenerator(
|
66 |
+
name=datasets.Split.TRAIN,
|
67 |
+
gen_kwargs={
|
68 |
+
"files": dl_manager.iter_files([data_files]),
|
69 |
+
},
|
70 |
+
)
|
71 |
+
]
|
72 |
+
|
73 |
+
def _generate_examples(self, files):
|
74 |
+
for i, path in enumerate(files):
|
75 |
+
file_name = os.path.basename(path)
|
76 |
+
if file_name.endswith(".wav"):
|
77 |
+
yield i, {
|
78 |
+
"time": 0,
|
79 |
+
"audio": path,
|
80 |
+
"label": 0,
|
81 |
+
}
|