Datasets:
⚠️ Work in Progress! SMB: A Multi-Texture Sheet Music Recognition Benchmark ⚠️
Overview
SMB (Sheet Music Benchmark) is a dataset of printed Common Western Modern Notation scores developed at the University of Alicante at the Pattern Recognition and Artificial Intelligence Group.
Dataset Details
- Image Format: PNG
- Annotations:
- Segmentation: Bounding boxes
- Music encoding (system-level and full-page): Humdrum **kern
- Use Cases:
- Optical Music Recognition (OMR): system-level, full-page
- Image Segmentation: music regions
SMB usage 📖
SMB is publicly available at HuggingFace.
To download from HuggingFace:
- Gain access to the dataset and get your HF access token from: https://huggingface.co/settings/tokens.
- Install dependencies and login HF:
- Install Python
- Run
pip install pillow datasets huggingface_hub[cli]
- Login by
huggingface-cli login
and paste the HF access token. Check here for details.
- Use the following code to load SMB and extract the regions:
from datasets import load_dataset
from PIL import Image, ImageDraw
ds = load_dataset("PRAIG/SMB")
# First image of the train split
data = ds["train"][0]
image = data["image"]
# Create a drawing context
draw = ImageDraw.Draw(image)
for reg in data["regions"]:
value = reg["bbox"]
# Calculate positions and dimensions
box_x = value["x"] / 100 * data["original_width"]
box_y = value["y"] / 100 * data["original_height"]
box_width = value["width"] / 100 * data["original_width"]
box_height = value["height"] / 100 * data["original_height"]
# Calculate the corners of the box
top_left = (box_x, box_y)
top_right = (box_x + box_width, box_y)
bottom_left = (box_x, box_y + box_height)
bottom_right = (box_x + box_width, box_y + box_height)
# Draw the box
draw.rectangle([top_left, bottom_right], width=3)
# Save the image with boxes
image.save("image.png")
Citation
If you use our work, please cite us:
@preprint{MartinezSevillaPRAIG24,
author = {Juan C. Martinez{-}Sevilla and
Noelia Luna{-}Barahona and
Joan Cerveto{-}Serrano and
Antonio Rios{-}Vila and
David Rizo and
Jorge Calvo{-}Zaragoza},
title = {A Multi{-}Texture Sheet Music Recognition Benchmark},
year = {2024}
}
- Downloads last month
- 27