Datasets:
File size: 7,231 Bytes
abd6616 64c25f2 |
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
---
license: cc
language:
- en
size_categories:
- 100K<n<1M
---
# MusicScore: A Dataset for Music Score Modeling and Generation
Official dataset repository for [paper](https://arxiv.org/abs/2406.11462):
**MusicScore: A Dataset for Music Score Modeling and Generation**.
> Author list: [Yuheng Lin](https://rozenthegoat.github.io), [Zheqi Dai](https://github.com/dzq84) and [Qiuqiang Kong](https://github.com/qiuqiangkong)
MusicScore is a large-scale music score dataset collected and processed from the International Music Score Library Project ([IMSLP](https://imslp.org/)).
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.
The metadata of MusicScore is extracted from the general information section of the IMSLP pages.
The metadata includes rich information about the composer, instrument, piece style, and genre of the music pieces.
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.
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).
## Dataset Description
MusicScore dataset is curated into three scales of subsets:
|Subset |Amount of images|
|:--------------|:---------------|
|MusicScore-400 |403 |
|MusicScore-14k |14656 |
|MusicScore-200k|204800 |
For MusicScore-400, it contains 19 most popular piano and violin compositions.
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).
## Example
An example sample (IMSLP913207_11.jpg from MusicScore-400), the image and its matching metadata stored in a JSON file.
```json
{
"Work Title": "Violin Concerto",
"Alternative. Title": "Violin Concerto [No.2]",
"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",
"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",
"Authorities": "WorldCat; Wikipedia; LCCN: n91030067; GND: 300101902",
"Composer": "Mendelssohn, Felix",
"Opus/Catalogue NumberOp./Cat. No.": "Op.64 ; MWV O 14",
"I-Catalogue NumberI-Cat. No.": "IFM 196",
"Key": "E minor",
"Movements/SectionsMov'ts/Sec's": "3 movements:\nAllegro molto appassionato (528 bars)\nAndante - Allegretto non troppo (123 bars)\nAllegro molto vivace (234 bars)",
"Year/Date of CompositionY/D of Comp.": "1838-1844 (Sept. 16), rev.1845",
"First Performance.": "1845-03-13 in Leipzig, Saal des Gewandhauses\nFerdinand David (violin), Gewandhaus orchestra, Niels Gade (conductor)",
"First Publication.": "1845 – Leipzig: Breitkopf und Härtel // London: J. J. Ewer & Co. // Milan: J. Ricordi\n(Hofmeister's Monatsbericht (1845), p.98)",
"Dedication": "Ferdinand David",
"Average DurationAvg. Duration": "30 minutes",
"Composer Time PeriodComp. Period": "Romantic",
"Piece Style": "Romantic",
"Instrumentation": "violin, orchestra",
"InstrDetail": "18 parts \n2 flutes, 2 oboes, 2 clarinets, 2 bassoons2 horns, 2 trumpets, timpani, strings",
"Related Works": "Grande Allegro di Concerto by BottesiniAnalytical studies for Mendelssohn's Violin Concerto by Ševčík",
"Discography": "MusicBrainz",
"External Links": "Wikipedia articleAll Music Guide",
"id": "IMSLP913207"
}
```
For MusicScore-400 subset, user can use the following method in your dataset definition:
```python
from torch.util.data import Dataset
import json
class MusicScore(Dataset):
def __init__(self):
self.meta_path = "/path/to/your/metadata"
with open(self.meta_path, 'r') as f:
self.meta_json = json.load(f)
def __getitem__(self, index):
example = {}
image_path = self.instance_data_root[index % self.num_instance_images]
...
score_id = image_path.split("_")[0]
try:
meta = next(item for item in self.meta_json if item['id'] == score_id)
except StopIteration:
print(f"Metadata with score_id {score_id} cannot be found")
raise ValueError
composer, instrumentation, piece_style, key, genre = meta["Composer"], meta["Instrumentation"], meta["Piece Style"], meta["key"], meta["genre"]
example["caption"] = (
f"a music score, composer is {composer}, instrumentation is {instrumentation}, piece style is {piece_style}, key is {key}, genre is {genre}"
)
return example
```
## Citation
```bibtex
@misc{lin2024musicscore,
title={MusicScore: A Dataset for Music Score Modeling and Generation},
author={Yuheng Lin and Zheqi Dai and Qiuqiang Kong},
year={2024},
journal={arXiv preprint arXiv:2406.11462},
}
``` |