Datasets:

Modalities:
Image
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
License:
Search is not available for this dataset
image
imagewidth (px)
1.33k
1.9k
label
class label
0 classes
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null

MusicScore: A Dataset for Music Score Modeling and Generation

Official dataset repository for paper:

MusicScore: A Dataset for Music Score Modeling and Generation.

Author list: Yuheng Lin, Zheqi Dai and Qiuqiang Kong

MusicScore is a large-scale music score dataset collected and processed from the International Music Score Library Project (IMSLP). 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, 14k, and 200k 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.

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.

Example

An example sample (IMSLP913207_11.jpg from MusicScore-400), the image and its matching metadata stored in a JSON file.

{
    "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:

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

@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},
}
Downloads last month
277
Edit dataset card