Data-Driven Glyph Positioning for Handwritten Music Synthesis
Organizations: Charles University, Prague, Czech Republic
Abstract
Synthesised data is a common strategy to address the lack of annotated handwritten music scores in Optical Music Recognition (OMR). Smashcima is a recent synthesis framework that assembles pages of handwritten scores by sampling glyph images from MUSCIMA++ and positioning them with hard-coded rules. In this work we ask whether these rules are grounded empirically and whether a learned model for context-dependent positioning can further improve synthesis quality. We extract inter-glyph distributions from around 285 thousand annotated relationships across MUSCIMA++ and OmniOMR, finding that several key parameters deviate systematically from real handwriting. Replacing these constants with empirical means reduces positioning RMSE by up to 60%. We then train a Graph Neural Network (GNN) on the Music Notation Graph structure to predict context-dependent offsets, achieving an additional 50 to 85% RMSE reduction on stems and beams by modelling how neighbouring glyphs constrain placement. Cross-dataset analysis shows that spacing differences between the two corpora are explained by note density (3.3), not style, and that duration-proportional spacing does not hold in handwriting (R2 = 0.001). In downstream evaluation, a YOLOv8 detector pretrained on GNN-positioned synthetic data achieves +30% mAP50 over the baseline and +11% over empirical means when fine-tuned on 200 real handwritten staves, showing that positioning accuracy matters for downstream OMR.
Figures & tables
| Relationship | Baseline | Empirical | RMSE | Improv. |
|---|---|---|---|---|
| value | mean | (global) | ||
| Stem length (up) | +60% | |||
| Stem length (down) | +57% | |||
| Beam angle (global) | +40% | |||
| Beam angle (per-writer) | writer int. | +49% | ||
| Inter-note gap | +29% |
| Edge type | Baseline | Empirical | GNN | vs Emp. | |
|---|---|---|---|---|---|
| notehead stem | 3.07 | 1.44 | 0.60 | +80.6% | 1984 |
| notehead beam | 6.89 | 7.13 | 1.07 | +84.4% | 1743 |
| notehead flag | 3.68 | 3.68 | 0.75 | +79.5% | 323 |
| notehead ledger line | 1.16 | 1.16 | 0.55 | +52.7% | 600 |
| notehead staccato | 2.59 | 2.59 | 0.91 | +65.0% | 289 |
| notehead duration dot | 0.62 | 0.62 | 0.61 | +1.5% | 131 |
| Shots | Baseline | Empirical | GNN | vs Base | vs Emp |
|---|---|---|---|---|---|
| 5 | 0.093 | 0.101 | 0.114 | +22.6% | +12.9% |
| 10 | 0.104 | 0.106 | 0.125 | +20.8% | +18.3% |
| 20 | 0.110 | 0.109 | 0.126 | +15.1% | +16.1% |
| 50 | 0.115 | 0.116 | 0.136 | +18.7% | +17.5% |
| 100 | 0.123 | 0.137 | 0.153 | +24.0% | +11.4% |
| 200 | 0.168 | 0.196 | 0.218 | +30.0% | +11.3% |
Synthetic Data Generation
Synthetic data generation creates artificial examples, simulations, and datasets to train, test, or protect machine-learning systems.
See all 625 papers