Datasets:

Modalities:
Image
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
Files changed (1) hide show
  1. README.md +111 -1
README.md CHANGED
@@ -4,4 +4,114 @@ language:
4
  - en
5
  size_categories:
6
  - 100K<n<1M
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - en
5
  size_categories:
6
  - 100K<n<1M
7
+ ---
8
+
9
+ # MusicScore: A Dataset for Music Score Modeling and Generation
10
+
11
+ Official dataset repository for [paper](https://arxiv.org/abs/2406.11462):
12
+
13
+ **MusicScore: A Dataset for Music Score Modeling and Generation**.
14
+ > Author list: [Yuheng Lin](https://rozenthegoat.github.io), [Zheqi Dai](https://github.com/dzq84) and [Qiuqiang Kong](https://github.com/qiuqiangkong)
15
+
16
+ MusicScore is a large-scale music score dataset collected and processed from the International Music Score Library Project ([IMSLP](https://imslp.org/)).
17
+ MusicScore consists of image-text pairs, where the image is a page of a music score and the text is the metadata of the music.
18
+ The metadata of MusicScore is extracted from the general information section of the IMSLP pages.
19
+ The metadata includes rich information about the composer, instrument, piece style, and genre of the music pieces.
20
+ MusicScore is curated into small, medium, and large scales of [400](./MusicScore-400/), [14k](./MusicScore-400/), and [200k](./MusicScore-400/) image-text pairs with varying diversity, respectively.
21
+
22
+
23
+ For codebase containing data processing scripts we used to craft MusicScore dataset and evaluation scripts for *music score generation* experiment along with FID measurement, please refer to [MusicScore-script](https://github.com/dzq84/MusicScore-script).
24
+
25
+ ## Dataset Description
26
+
27
+ MusicScore dataset is curated into three scales of subsets:
28
+
29
+ |Subset |Amount of images|
30
+ |:--------------|:---------------|
31
+ |MusicScore-400 |403 |
32
+ |MusicScore-14k |14656 |
33
+ |MusicScore-200k|204800 |
34
+
35
+ For MusicScore-400, it contains 19 most popular piano and violin compositions.
36
+
37
+ For MusicScore-14k and -200k, we filtered images by color depth and cover contents. For later one, we train a classification model simply based on ResNet18, for details, please refer to the corresponding codebase [MusicScore-script](https://github.com/dzq84/MusicScore-script).
38
+
39
+
40
+ ## Example
41
+
42
+ An example sample (IMSLP913207_11.jpg from MusicScore-400), the image and its matching metadata stored in a JSON file.
43
+
44
+
45
+ ```json
46
+ {
47
+ "Work Title": "Violin Concerto",
48
+ "Alternative. Title": "Violin Concerto [No.2]",
49
+ "Name Translations": "Koncert skrzypcowy; Husľový koncert; Концерт для скрипки с оркестром; 바이올린 협주곡; concerto pour violon en mi mineur; Violin Concerto in E minor; Concierto para violín; Concertul pentru vioară; ไวโอลินคอนแชร์โต; Concert per a violí; Viulukonsertto; Концерт для скрипки з оркестром; Concerto per violino e orchestra op. 64; Violinkonzert e-Moll; ヴァイオリン協奏曲; Violinski koncert; Vioolconcert; کنسرتو ویلن در می مینور (مندلسون); 小提琴协奏曲; Violin Concerto (Mendelssohn); 小提琴協奏曲孟德爾頌; Violinkonsert; Houslový koncert e moll; Concerto para violino; Violinkoncert i e-mol; קונצ'רטו לכינור במי מינור; Kunċert għal vjolin u orkestra fil-Mi minuri, op. 64; Koncertas smuikui (Mendelsonas); Konserto Biola dalam E Minor; Violonkonĉerto en E-minoro",
50
+ "Name Aliases": "멘델스존 바이올린 협주곡; 멘델스존 바이올린협주곡; Concierto para violin; Concierto para violín nº 2; Concierto para violín n.º 2; Concierto para violin n 2; Concierto para violin nº 2; Concierto para violin n.º 2; Concierto para violin nº2 de Mendelssohn; Concierto para violín n 2; Concierto para violin n 2 de Mendelssohn; Concierto para violín n 2 de Mendelssohn; Concierto para violin n. 2; Concierto para violín n. 2; Concierto para violín nº2 de Mendelssohn; ไวโอลินคอนแชร์โต ในบันไดเสียง อี ไมเนอร์; Concert per a violí de Mendelssohn; Mendelssohnin viulukonsertto; Violinkonzert; Violinkonzert e-Moll op. 64; メンコン; メン・コン; Violinski koncert- Mendelssohn; Vioolconcert in e-klein; Vioolconcert (Mendelssohn-Bartholdy); concerto n° 2 pour violon et orchestre en mi mineur; concerto pour violon n° 2 de Mendelssohn; concerto n° 2 pour violon et orchestre; concerto n° 2 pour violon; concerto pour violon n° 2; concerto pour violon et orchestre n° 2 de Mendelssohn; Violin Concerto in E Minor, Op. 64; קונצ'רטו לכינור במי מינור, אופוס 64; Konserto Biola dalam E Minor, Op. 64",
51
+ "Authorities": "WorldCat; Wikipedia; LCCN: n91030067; GND: 300101902",
52
+ "Composer": "Mendelssohn, Felix",
53
+ "Opus/Catalogue NumberOp./Cat. No.": "Op.64 ; MWV O 14",
54
+ "I-Catalogue NumberI-Cat. No.": "IFM 196",
55
+ "Key": "E minor",
56
+ "Movements/SectionsMov'ts/Sec's": "3 movements:\nAllegro molto appassionato (528 bars)\nAndante - Allegretto non troppo (123 bars)\nAllegro molto vivace (234 bars)",
57
+ "Year/Date of CompositionY/D of Comp.": "1838-1844 (Sept. 16), rev.1845",
58
+ "First Performance.": "1845-03-13 in Leipzig, Saal des Gewandhauses\nFerdinand David (violin), Gewandhaus orchestra, Niels Gade (conductor)",
59
+ "First Publication.": "1845 – Leipzig: Breitkopf und Härtel // London: J. J. Ewer & Co. // Milan: J. Ricordi\n(Hofmeister's Monatsbericht (1845), p.98)",
60
+ "Dedication": "Ferdinand David",
61
+ "Average DurationAvg. Duration": "30 minutes",
62
+ "Composer Time PeriodComp. Period": "Romantic",
63
+ "Piece Style": "Romantic",
64
+ "Instrumentation": "violin, orchestra",
65
+ "InstrDetail": "18 parts \n2 flutes, 2 oboes, 2 clarinets, 2 bassoons2 horns, 2 trumpets, timpani, strings",
66
+ "Related Works": "Grande Allegro di Concerto by BottesiniAnalytical studies for Mendelssohn's Violin Concerto by Ševčík",
67
+ "Discography": "MusicBrainz",
68
+ "External Links": "Wikipedia articleAll Music Guide",
69
+ "id": "IMSLP913207"
70
+ }
71
+ ```
72
+
73
+ For MusicScore-400 subset, user can use the following method in your dataset definition:
74
+
75
+ ```python
76
+ from torch.util.data import Dataset
77
+ import json
78
+
79
+ class MusicScore(Dataset):
80
+ def __init__(self):
81
+ self.meta_path = "/path/to/your/metadata"
82
+ with open(self.meta_path, 'r') as f:
83
+ self.meta_json = json.load(f)
84
+
85
+ def __getitem__(self, index):
86
+ example = {}
87
+ image_path = self.instance_data_root[index % self.num_instance_images]
88
+ ...
89
+ score_id = image_path.split("_")[0]
90
+
91
+ try:
92
+ meta = next(item for item in self.meta_json if item['id'] == score_id)
93
+ except StopIteration:
94
+ print(f"Metadata with score_id {score_id} cannot be found")
95
+ raise ValueError
96
+
97
+ composer, instrumentation, piece_style, key, genre = meta["Composer"], meta["Instrumentation"], meta["Piece Style"], meta["key"], meta["genre"]
98
+
99
+ example["caption"] = (
100
+ f"a music score, composer is {composer}, instrumentation is {instrumentation}, piece style is {piece_style}, key is {key}, genre is {genre}"
101
+ )
102
+
103
+ return example
104
+ ```
105
+
106
+
107
+
108
+ ## Citation
109
+
110
+ ```bibtex
111
+ @misc{lin2024musicscore,
112
+ title={MusicScore: A Dataset for Music Score Modeling and Generation},
113
+ author={Yuheng Lin and Zheqi Dai and Qiuqiang Kong},
114
+ year={2024},
115
+ journal={arXiv preprint arXiv:2406.11462},
116
+ }
117
+ ```