muscima – tools for the MUSCIMA++ dataset

The muscima package implements tools for easier manipulation of the MUSCIMA++ dataset. Download the dataset here:

A description of the dataset is on the project’s homepage:

And more thoroughly in an publication:

This pacakge is licensed under the MIT license (see LICENSE.txt file). The package author is Jan Hajič jr. You can contact him at:

Questions and comments are welcome! This package is also hosted on github, so if you find a bug, submit an issue (or a pull request!) there:


Python 3.5, otherwise nothing beyond the requirements.txt file: lxml and numpy. If you want to apply pitch inference, you should also get music21.


If you have pip, just run:

pip install muscima

If you don’t have pip, then you should get it. Or use the Anaconda distribution.

First steps

Let’s first download the dataset:

curl >
cd MUSCIMA++_0.9

Take a look at the dataset’s file first. You can also read it online:

Please make sure you understand the license requirements – the data is licensed as CC-BY-NC-SA 4.0, and because it is built over a previous dataset, there are two attributions required.

Next, we fire up ipython (or just the plain python console, but definitely check out ipython if you don’t use it!) and parse the data:

>>> import os
>>> from import parse_cropobject_list
>>> cropobject_fnames = [os.path.join('data', 'cropobjects', f) for f in os.listdir('data/cropobjects')]
>>> docs = [parse_cropobject_list(f) for f in cropobject_fnames]
>>> len(docs)

In docs, we now have a list of CropObject lists for each of the 140 documents.

Now that the dataset has been parsed, we can try to do some experiments! We can do for example symbol classification. Go check out the MUSCIMA++ Tutorial!


Indices and tables