Gamera Addon: MusicStaves Toolkit
This is a Gamera toolkit for experimenting with different methods for staff removal from digital images of sheet music. It is based on the Gamera framework and requires a working Gamera installation.
This toolkit currently still requires Gamera 3 and Python 2.x.
About the MusicStaves toolkit
The most characteristic feature of sheet music are groups of parallel horizontal lines, the staff lines. For a human reader these are necessary in order to determine the note pitch. In Optical Music Recognition (OMR) however, these hinder the segmentation of the symbols and thus usually need to be removed. In order to determine the pitch of the remaining symbols it is also necessary to remember the position where the staff lines have been.
There is a great variety of possible methods for staff line removal and not all are appropriate for all circumstances. Not all images are as perfect as the example above and staff line removal can also be applied to something different than common music notation (eg. lute tablature or text documents with underlined sections).
The MusicStaves toolkit provides
- methods for removing staff lines and querying their position afterwards
- a plugin mechanism for adding own staff line removal algorithm
- methods for generating artificially degraded test data
- methods for evaluating the performance of a staff removal algorithm
Documentation
A detailed documentation is included with the source code package in the subdirectory doc/html, or you can browse it here online. For a detailed description of the methods for staff removal, degradation, and performance evaluation together with an experimental comparison of the algortihms, see
C. Dalitz, M. Droettboom, B. Pranzas, I. Fujinaga: A Comparative Study of Staff Removal Algorithms. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 5, pp. 753-766 (2008)
When referring to this toolkit, you can cite this paper. When linking to this toolkit on a website, please link to the official project home page
http://music-staves.sf.net/
Test data sets
There are currently two test sets publicly available for evaluating staff removal algorithms with this toolkit:
The Synthetic Score Database by Christoph Dalitz
This contains 32 scores that have been computer generated with different music typesetting programs. It contains ground truth data and is suitable for the deformations implemented in the toolkit. For a download, see- testset-musicstaves.tar.gz (7.5 MB, see the file Readme for a description)
The CVC-MUSCIMA Database by Alicia Fornés
This collection contains 1,000 handwritten samples of the same 20 music scores, each of which has been written by 50 different writers. The test set includes images synthetically distorted with the algorithms from the toolkit. It can be downloaded from the
Authors and Acknowledgements
The authors of the OTR toolkit are:
Software Download
The source code of the MusicStaves toolkit is freely distributed under the terms of the GNU General Public License. Note that the toolkit requires a working installation of Gamera.
File releases of stable versions are available below. Moreover you can get a development snapshot via SVN access from the MusicStaves SourceForge site. In short, you obtain the source code with the following command:
svn co svn://svn.code.sf.net/p/music-staves/code/ music-staves
This will create the subdirectory music-staves and download the source code therein. You can then install the toolkit with
cd music-staves
python setup.py build && sudo python setup.py install
Available source code file releases for all platforms are:
- musicstaves-1.4.0.tar.gz (Oct 27 2015)
- musicstaves-1.3.10.tar.gz (Apr 24 2015)
For release notes, see the file CHANGES. For installation and usage instructions see the file doc/html/index.html in the source package. When all prerequisites are installed, installation simply requires typing
python setup.py build && sudo python setup.py install