k111-homr-ft
A fine-tune of the HOMR transformer (official checkpoint 465) on public-domain piano scans. A human reviewer proof-read every measure of the new training data against the original scans.
- Status: research release. We recommend non-commercial use only (see Licence and lineage).
- What it does: reads one system (one line of a piano score) at a time from a scan of printed music.
- Training data: the new data is 93 late-romantic and early-modern piano pieces, mostly by Russian composers, plus standard public datasets.
- How good it is: it is a modest model. On the IMSLP-Piano leaderboard it scores 0.2546 OMR-NED (lower is better). That puts it in the middle of the table, roughly level with our earlier internal model, and well behind the best systems.
Why we think whole-score recognition is not the road to usable editions
We should say first where this view does not come from. It does not come from beating anyone: this model ranks in the middle of the leaderboard. It comes from a different place. Since October 2026 we have turned old scans into scores a pianist can play from, and checked every measure by hand. Here, "whole-score recognition" means asking one model to turn a page image directly into a finished score, and judging the result by one whole-score similarity number. We tried that road. We no longer believe it leads, on its own, to editions a musician can use. Our reasons:
-
The costly errors are ones these models are not built or scored to fix. We proof-read 160+ pieces. Pitches and rhythms were almost never the problem. The rework was in engraving decisions:
- which way stems and beams point;
- which notes are beamed together;
- slurs;
- which of two colliding noteheads sits on the left.
Some models have no way to output these things at all. In HOMR's own token format, for example, beam marks are discarded and stem direction has nowhere to go. A whole-score similarity number barely notices them either. So a better leaderboard score did not mean less work for our reviewer.
-
Generating the whole score re-opens what was already right. When one model writes the whole score, each new attempt can put fresh pitch or rhythm errors into passages that were correct. We get better results by working in layers:
- each layer comes from the source that is best at it (for example, a classical recogniser for beams);
- anything two independent sources agree on is accepted;
- only disagreements go to a model or a human.
-
Real, verified, full-page data is scarce, and adding more did not fix the hard part. Each verified page costs hours of human work. For this release we added 93 such pieces, about 3,700 measures. Slur accuracy did not improve: segment-level slur F1 on our real-scan test set went from 0.227 to 0.219. This is one experiment with one recipe, so it proves little. But it matches what we see every day: the bottleneck is fidelity to the engraving, not more of the same kind of training data.
-
A publishable edition must follow its source, not the average. A model that learns what scores usually look like tends to normalise. An edition has to reproduce this engraver's choices: where a cross-staff beam goes, which voice's notehead is on the left, where a slur starts. That can only be checked against the original. So every correction in our workflow is tied to a crop of the source page.
So our pipeline uses recognition models like this one only for a first pass, one system at a time. The rest of the effort goes into layer-by-layer checks, a patched notation renderer and a review desk.
How the training scores were made
The verified data behind this model comes from daily, hands-on work since October 2026.
- Repertoire: 248 catalogued pieces by 67 composers, from editions printed between 1880 and 1962. Most are rarely played: Maykapar, Glière, Grechaninov, Akimenko, Bortkiewicz, Wihtol, Rebikov, Pachulski and others. For many of them no clean modern edition exists; there were only old scans.
- Rights: every piece has a rights record. By default we include composers who died in or before 1955. Composers who died between 1956 and 1960 are included only for works published before 1930, and those works are marked public domain in the US only.
- Pipeline: every piece goes through four stages:
- several recognisers;
- automatic checks of beams, stems and slurs;
- rendering with a notation renderer we patched ourselves (a MuseScore 4.7.5 build that fixes grace-note stems, cross-staff notes and a crash on exit);
- human review.
- Review: the reviewer read every measure next to the original scan. A correction is made by pointing at the scan and saying what is wrong, for example "the hollow note goes on the right, don't let them touch." On the review desk alone that came to about 1,200 annotated corrections across 118 pieces. Each correction is kept as a training example, with:
- its coordinates on the source page;
- the score before and after;
- the reviewer's words;
- file hashes.
- Result: 163 pieces (about 6,900 measures) passed human review. 93 of them were used to train this model: the ones whose public-domain status is clear and whose scans could be aligned system by system. They are listed in
training_pieces.csv, with the scan source for each piece (IMSLP or the Sibley Music Library).
None of the scans are distributed here; they were used for training only.
Training
- Starting point: HOMR official checkpoint 465 (
pytorch_model_465-597144ca…). - Training data (21,038 system images):
- the 93 reviewed pieces above (84 for training and 9 for validation, cut into systems, with slurs in the labels);
- GrandStaff;
- OLiMPiC (both the scanned and the synthetic part);
- OpenScore Lieder renders.
- Left out on purpose:
- an evaluation set licensed CC BY-NC-SA;
- a dataset we had only internal permission to use;
- every work in the 32-page IMSLP-Piano leaderboard test set (checked work by work).
- Run: 12 epochs scheduled, early-stopped at epoch 7 (best validation loss). It took about 6 hours on one GPU.
Evaluation
IMSLP-Piano leaderboard (OMR-NED, lower is better):
| Model | OMR-NED |
|---|---|
| this model | 0.2546 |
| our earlier internal model (k34a) | 0.2561 |
The leaderboard's own table has the other systems.
One page needed a writer fix. On one leaderboard page (#28), a grace-note group contains a rest, and HOMR's MusicXML writer stopped there with an assertion error. We fixed the bug in general, not for that page; the fix is in homr_writer_grace_rest_fix.patch. The submission used the patched writer for that page only.
Our own test sets. Each number compares this model with k34a, our earlier internal model. k34a was trained on data we may not redistribute, so it is not released. We set pass/fail thresholds before training, and this model did not meet them. We publish it anyway and say so.
| Metric | k34a | this model |
|---|---|---|
| OMR-NED, our production pages ↓ | 0.111 | 0.119 |
| OMR-NED, real-scan set B ↓ | 0.233 | 0.207 |
| OMR-NED, set A ↓ | 0.280 | 0.281 |
| Slur F1, segment level, set B ↑ | 0.227 | 0.219 |
| Slur F1, segment level, OLiMPiC scanned ↑ | 0.556 | 0.540 |
| Slur F1, page level, sets A+B ↑ | 0.162 | 0.165 |
| Measure accuracy, production pages, loose / strict ↑ | 77.7 / 77.5 | 78.2 / 77.9 |
| Measure accuracy, set B, loose / strict ↑ | 81.1 / 78.4 | 77.9 / 75.3 |
| Measure accuracy, set A, loose / strict ↑ | 67.3 / 67.6 | 66.3 / 66.5 |
Files
| File | What it is |
|---|---|
encoder_k111.onnx, decoder_k111.onnx | fp32 ONNX, used in all the numbers above |
encoder_k111_fp16.onnx, decoder_k111_fp16.onnx | fp16 ONNX |
k111.pth | PyTorch weights, for further fine-tuning |
training_pieces.csv | the 93 reviewed pieces and their scan sources |
homr_writer_grace_rest_fix.patch | the MusicXML writer fix described above |
How to use
The files run in HOMR at commit edebb40. HOMR loads its models by fixed file names, so copy these files over the checkpoint-465 names:
git clone https://github.com/liebharc/homr && cd homr && git checkout edebb40
M=pytorch_model_465-597144cab54c8f6d0f6c9619df5c5312694eadd6
for p in encoder decoder; do
cp /path/to/${p}_k111.onnx homr/transformer/${p}_${M}.onnx
cp /path/to/${p}_k111_fp16.onnx homr/transformer/${p}_${M}_fp16.onnx
done
git apply /path/to/homr_writer_grace_rest_fix.patch # optional
Then follow HOMR's README to run it on an image.
Licence and lineage
- Code and weights: AGPL-3.0, inherited from HOMR. Offering the model as a network service brings in the source-sharing duty in AGPL §13.
- Lineage: HOMR's released checkpoints, including 465, were trained with Camera-PrIMuS, whose Hugging Face copy is CC BY-NC 4.0. This model inherits that history, so we recommend research and non-commercial use only. Whether a dataset's licence carries over to weights trained on it is an open legal question, and nothing here is legal advice.
- Data attributions:
- GrandStaff: Multiscore project, University of Alicante. The original source states no licence; the Hugging Face copy, PRAIG/grandstaff, is marked MIT.
- OLiMPiC: J. Mayer, M. Straka, J. Hajič jr. and P. Pecina, Practical End-to-End Optical Music Recognition for Pianoform Music (arXiv:2403.13763). It is built on OpenScore Lieder; we used the zzsi/olimpic copy, licensed CC BY-SA 4.0.
- OpenScore Lieder renders: CC BY-SA 4.0, via zzsi/openscore. The upstream OpenScore Lieder corpus is CC0.
- The 93 reviewed pieces: the works are in the public domain in the US. See
training_pieces.csv.
Limitations
- What it outputs: pitches, rhythms, slurs and some articulations. It does not output stem direction or beam grouping.
- Where it works: it is tuned towards engraved piano music from the late 19th and early 20th centuries. On our older-repertoire test sets (A and B), it is no better than our earlier model.
- How to use the output: as a first draft that needs human proof-reading.