arXiv:2610.24530cs.CVOct 2026

Manuscript Offprint

arXiv:2610.24530

An Optical Music Recognition Tool for String Quartets

Jin-Shiang Hu, Bo-Yuan Cheng, Li Su

ABSTRACT

This paper presents an optical music recognition (OMR) system tailored for PDF scores of string quartet pieces. The approach begins with a SegNet-based segmentation model to localize musical regions, followed by convolutional neural networks and image processing techniques to classify and extract musical symbols. To improve rhythmic precision, dynamic programming methods enforce time signature constraints and explicitly handle tuples. Evaluation using a longest common subsequence metric across multiple feature matrices demonstrates robust accuracy in recognizing pitch, onset, duration, and accidentals on a benchmark dataset. Code and data are available at https://github.com/lattellie/25-omr.

1. INTRODUCTION

Optical music recognition (OMR) [1–3] is a fundamental technique in processing music notation. Several challenges remain in OMR, including the alignment of music across multiple instrumental tracks, consistency in bar lengths according to time signatures, and the handling of tuples and irregular rhythmic patterns. For multi-staff OMR, string quartets provide a well-structured and manageable test case. Despite being more compact, they encompass the full range of clefs, key signatures, double stops, and complex rhythmic patterns. This makes them a suitable intermediate step toward more complex scores, allowing us to address the challenges in a controlled setting.

Our system focuses on performing OMR on PDF sheet music of string quartet compositions. Our approach begins with a SegNet model taken directly from the open-source repository at https://github.com/BreezeWhite/oemer [4]. We used this pre-trained model, which forms the foundation for locating staff regions and isolating individual musical elements. Then, we apply a combination of traditional image processing techniques and convolutional neural networks (CNNs) to further refine the detection and classification of individual music symbols. Using OpenCV [5], we implemented a pipeline to classify musical symbols, infer rhythmic structure, correct timing to enforce time signatures, handle tuples, and convert the results into an editable MusicXML format. Also, to address rhythmic accuracy, we incorporate a dynamic programming-based correction step that enforces timing constraints, ensuring that bar lengths are consistent and tuples are correctly interpreted and represented.

We utilize the Annotated Beethoven Corpus (ABC) dataset for evaluation [6]. The number of correctly recognized notes is determined by computing the longest common subsequence (LCS) between the ABC reference and our system's output. This approach better captures the sequential structure of music, addressing a key limitation of Symbol Error Rate (SER) [1,7–9], which does not account for the musical order of events.