OMR benchmarking framework for evaluating music score transcription models on the PRAIG/SMB dataset.
- Python 3.10+
- HuggingFace account for dataset access
git clone https://github.com/yourusername/notes2tone.git
cd notes2toneconda create -n notes2tone python=3.12 -y
conda activate notes2tonecd /notes2tone
pip install -e .# Clone repository
cd ~/work # or your preferred location
git clone https://github.com/liebharc/homr.git
cd homr
# Install Poetry
pip install poetry
poetry config virtualenvs.create false
# Install dependencies
poetry install --only main,gpu # For GPU support
# or: poetry install --only main # For CPU only
# or: poetry install # For development
# Test installation
poetry run homr <image_path>- Windows: Download .msi from releases
- Linux: use install script to install localy or download .deb or use Flatpak from Flathub
chmod +x audiveris_setup.sh
./audiveris_setup.sh- macOS: Download .dmg from releases
- Build it yourselfe: Requires Java 11+ (download here)
Create .env file in notes2tone project root:
HF_TOKEN=your_token_here
Get token: https://huggingface.co/settings/tokens
Request access: https://huggingface.co/datasets/PRAIG/SMB
# Benchmark all models
python -m benchmarks.benchmark --models all --limit 10
# Benchmark specific models
python -m benchmarks.benchmark --models oemer homr --limit 1python dataset_viewer.pypython -m benchmarks.audiveris_pipeline \
--audiveris-path /path/to/Audiveris \
--audiveris-upscale-factor 2.0 \
--audiveris-upscale-max-side 3500If Audiveris skips many pages because staff lines are too close, increase --audiveris-upscale-factor (e.g. 2.5).
benchmarks/
├── datasets/ # Dataset loaders (SMB)
├── models/ # OMR model wrappers (OeMeR, homr, Audiveris)
├── converters/ # MusicXML → **kern
├── eval/ # OMR-NED metrics
└── benchmark.py # Main CLI
Create class in benchmarks/models/:
from benchmarks.models.base_model import BaseOMRModel
class MyModel(BaseOMRModel):
def _predict_impl(self, image_path: str, debug_dir: Path) -> str:
# Return **kern notation
return kern_outputRegister in benchmarks/benchmark.py.
GPU not working:
nvidia-smi
nvtopHF authentication error: Check .env file and dataset access request
First run slow: Model compilation takes 2-5 min initially
OMR-NED: Normalized Edit Distance (lower = better, 0.0 = perfect)
- Download (PDF): https://github.com/dasrinkana/notes2tone/releases/download/v0.1.0/notes2tone_Endbericht.pdf
- PRAIG/SMB dataset: https://huggingface.co/datasets/PRAIG/SMB
- OeMeR: https://github.com/BreezeWhite/oemer
- music21: http://web.mit.edu/music21/
This repository is licensed under the MIT License.
See the LICENSE file for details.
This project also includes modified MIT-licensed code from musicdiff.
Original project lineage and attribution are preserved in the source headers under musicdiff/.