Datasets:
License:
admin
commited on
Commit
•
1294ff9
1
Parent(s):
aba2265
upl py
Browse files- .gitattributes +3 -0
- .gitignore +5 -0
- README.md +46 -1
- hoyoMusic.py +51 -0
.gitattributes
CHANGED
@@ -53,3 +53,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
genshin.jsonl filter=lfs diff=lfs merge=lfs -text
|
57 |
+
test.jsonl filter=lfs diff=lfs merge=lfs -text
|
58 |
+
train.jsonl filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
test.py
|
2 |
+
__pycache__/*
|
3 |
+
midi/__pycache__/*
|
4 |
+
*.mid
|
5 |
+
rename.sh
|
README.md
CHANGED
@@ -1,3 +1,48 @@
|
|
1 |
---
|
2 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: cc-by-nc-nd-4.0
|
3 |
+
task_categories:
|
4 |
+
- text-generation
|
5 |
+
- text2text-generation
|
6 |
+
- text-classification
|
7 |
+
language:
|
8 |
+
- en
|
9 |
+
- zh
|
10 |
+
tags:
|
11 |
+
- art
|
12 |
+
- music
|
13 |
+
- mihoyo
|
14 |
+
- genshin
|
15 |
+
pretty_name: Dataset of mihoyo game songs in abc notation
|
16 |
+
size_categories:
|
17 |
+
- n>300K
|
18 |
---
|
19 |
+
|
20 |
+
# Intro
|
21 |
+
This dataset mainly contains slices of second creation piano music from Genshin Impact game, which have been converted to ABC notations, with a data volume of 305264. The labeling information covers the score structure information related to the style of the game scene where the music is located. This dataset is not only the result of game music extraction, but also provides important training material about note and melodic structure in the field of researching the second creation music generation of Genshin Impact. Through this resource, the researcher can deeply analyze the characteristics of the game music and provide substantial data support for the training and improvement of music generation algorithms.
|
22 |
+
|
23 |
+
## Usage
|
24 |
+
```python
|
25 |
+
from datasets import load_dataset
|
26 |
+
|
27 |
+
ds = load_dataset("MuGeminorum/hoyoMusic")
|
28 |
+
|
29 |
+
for item in ds["train"]:
|
30 |
+
print(item)
|
31 |
+
|
32 |
+
for item in ds["test"]:
|
33 |
+
print(item)
|
34 |
+
```
|
35 |
+
|
36 |
+
## Maintainence
|
37 |
+
```bash
|
38 |
+
git clone [email protected]:datasets/MuGeminorum/hoyoMusic
|
39 |
+
cd hoyoMusic
|
40 |
+
```
|
41 |
+
|
42 |
+
## Mirror
|
43 |
+
<https://www.modelscope.cn/datasets/MuGeminorum/hoyoMusic>
|
44 |
+
|
45 |
+
## Reference
|
46 |
+
[1] <https://musescore.org><br>
|
47 |
+
[2] <https://huggingface.co/datasets/sander-wood/irishman><br>
|
48 |
+
[3] <https://genshin-impact.fandom.com/wiki/Genshin_Impact_Wiki>
|
hoyoMusic.py
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
+
import random
|
4 |
+
import datasets
|
5 |
+
|
6 |
+
_HOMEPAGE = (
|
7 |
+
f"https://www.modelscope.cn/datasets/MuGeminorum/{os.path.basename(__file__)[:-3]}"
|
8 |
+
)
|
9 |
+
|
10 |
+
_URL = f"{_HOMEPAGE}/resolve/master/data/dataset.jsonl"
|
11 |
+
|
12 |
+
|
13 |
+
class hoyoMusic(datasets.GeneratorBasedBuilder):
|
14 |
+
def _info(self):
|
15 |
+
return datasets.DatasetInfo(
|
16 |
+
features=datasets.Features(
|
17 |
+
{
|
18 |
+
"prompt": datasets.Value("string"),
|
19 |
+
"data": datasets.Value("string"),
|
20 |
+
"label": datasets.Value("string"),
|
21 |
+
}
|
22 |
+
),
|
23 |
+
supervised_keys=("data", "label"),
|
24 |
+
homepage=_HOMEPAGE,
|
25 |
+
license="CC-BY-NC-ND",
|
26 |
+
version="0.0.1",
|
27 |
+
)
|
28 |
+
|
29 |
+
def _split_generators(self, dl_manager):
|
30 |
+
dataset = []
|
31 |
+
data = dl_manager.download(_URL)
|
32 |
+
with open(data, "r", encoding="utf-8") as file:
|
33 |
+
for line in file:
|
34 |
+
dataset.append(json.loads(line))
|
35 |
+
|
36 |
+
random.shuffle(dataset)
|
37 |
+
data_count = len(dataset)
|
38 |
+
p90 = int(data_count * 0.9)
|
39 |
+
|
40 |
+
return [
|
41 |
+
datasets.SplitGenerator(
|
42 |
+
name=datasets.Split.TRAIN, gen_kwargs={"files": dataset[:p90]}
|
43 |
+
),
|
44 |
+
datasets.SplitGenerator(
|
45 |
+
name=datasets.Split.TEST, gen_kwargs={"files": dataset[p90:]}
|
46 |
+
),
|
47 |
+
]
|
48 |
+
|
49 |
+
def _generate_examples(self, files):
|
50 |
+
for i, path in enumerate(files):
|
51 |
+
yield i, path
|