MUMuSViTFeatured
MuSViT: Music Score Vision Transformer Foundation Model
MuSViT (Music Score Vision Transformer) is the first domain-specific foundation vision model designed explicitly for Optical Music Recognition (OMR) and symbolic sheet music representation. Developed by the Pattern Recognition and Artificial Intelligence Group (PRAIG) at the University of Alicante and accepted at ECCV 2026.
Standard general-purpose vision foundation models (like DINOv2 or CLIP) are optimized for natural images and frequently struggle to capture the complex, fine-grained 2D spatial layouts of sheet music—such as staff line alignments, notehead pitches, and polyphonic symbols. MuSViT addresses this gap by utilizing a Vision Transformer backbone with 2D sinusoidal positional encodings, pre-trained via Masked Autoencoders (MAE) on 9.7 million sheet music pages from the International Music Score Library Project (IMSLP).
🔬 Architecture & Methodology
- Vision Transformer Backbone: Built on a ViT-Base architecture (12 Transformer layers, 768 projection dimensions, 16x16 patch size, ~86M parameters).
- 2D Sinusoidal Positional Encodings: Replaces standard 1D positional encodings with explicit 2D sinusoidal encodings to capture both horizontal temporal progression and vertical pitch relationships across staves.
- Two-Stage Curriculum Pre-training:
- Warm-up Phase: Pre-trained on synthetic typeset scores (DeepScoresV2) to initialize baseline feature representations and prevent dimensional collapse.
- Scale Phase: Masked Autoencoder (MAE) self-supervised training across 9.7M real-world scanned pages from IMSLP.
- Task-Agnostic Feature Embeddings: Outputs high-dimensional embeddings suitable for linear probing, fine-tuning, or zero-shot feature extraction across diverse downstream music recognition tasks.
Sheet Music Image (1024x1024) ──► 16x16 Patching + 2D Positional Enc ──► 12-Layer ViT MAE Encoder ──► [1, 4097, 768] Embeddings🎯 Downstream Applications & Benchmarks
| Downstream Task | Performance & Comparison |
|---|---|
| Full-Page & Staff OMR | Significantly outperforms general vision backbones (DINOv2/v3, ViT-Base) on symbolic music transcription. |
| Music Symbol Detection | Achieves top accuracy in detecting clefs, key signatures, noteheads, and rests. |
| Score Difficulty Classification | Superior linear-probe accuracy when categorizing score complexity across classical repertoires. |
🚀 Quickstart Usage
MuSViT can be loaded directly via the Hugging Face transformers library:
import torch
from transformers import ViTModel
from PIL import Image
from torchvision import transforms as T
# 1. Load the pre-trained MuSViT foundation model
model = ViTModel.from_pretrained('PRAIG/musvit', trust_remote_code=True)
model.eval()
# 2. Preprocess input sheet music (Resize or Pad to 1024x1024)
image_path = 'sheet_music_sample.png'
image = Image.open(image_path).convert("RGB")
transform = T.Compose([
T.Resize([1024, 1024]),
T.ToTensor()
])
input_tensor = transform(image).unsqueeze(0) # Shape: [1, 3, 1024, 1024]
# 3. Extract feature representations
with torch.no_grad():
outputs = model(input_tensor)
embeddings = outputs.last_hidden_state # Shape: [1, 4097, 768]
print("Successfully extracted MuSViT embeddings:", embeddings.shape)🔗 Official Links & Resources
Key Features
Domain-Specific Foundation Encoder: Engineered explicitly for optical music recognition and complex symbolic musical score analysis
Large-Scale Pre-training: Pre-trained via Masked Autoencoders (MAE) on 9.7 million IMSLP sheet music pages
Two-Stage Curriculum Learning: Warm-up on synthetic DeepScoresV2 followed by IMSLP scale pre-training to prevent dimensional collapse
2D Sinusoidal Positional Encodings: Explicitly captures vertical pitch positions and horizontal staff structures essential for sheet music
Versatile Downstream Performance: Outperforms general-purpose vision encoders (DINOv2/3, ViT) on full-page score recognition, staff-level OMR, symbol detection, and score difficulty classification
You might also want to compare
Verified Sources
Tags
Model Specs
Parameters
86M
Context Window
1024x1024
License
CC-BY-NC-SA-4.0
Deployment
Resources & Links
Curator Notes
Verified foundation vision model for Optical Music Recognition (OMR) from PRAIG (Pattern Recognition and Artificial Intelligence Group), University of Alicante. Accepted at ECCV 2026.
Compare Specs
Compare parameters, context windows, modalities, and benchmark scores of this model side-by-side with others.
Compare Model