Skip to content

OMR-Research/Smashcima

Repository files navigation

License Apache 2.0 PyPI version Downloads Python Version





A library and a framework for synthesizing images containing handwritten music, intended for the creation of training data for OMR models.

Try out the demo on 🤗 Huggingface Spaces right now!
Example output with MUSCIMA++ writer no. 28 style:


Install from pypi with:

pip install smashcima

Getting started

To quickly learn how to start using Smashcima for your project, start with the tutorials:

  1. Producing music notation images
  2. Changing image background
  3. Using custom glyphs

How it works

Smashcima is primarily a framework and a set of crafted interfaces for building custom visual-data related synthesizers.

  • Introduction
  • Models and service orchestration
  • Scene
    • Scene objects
    • Affine spaces and rendering
    • Semantic music scene objects
    • Visual music scene objects
  • Synthesis
    • Synthesizer interfaces
    • Glyphs
    • Style control
  • Asset bundles
  • ...

After cloning

Create a virtual environment and install dependencies:

python3 -m venv .venv
.venv/bin/pip3 install -e .

# to run jupyter notebooks:
.venv/bin/pip3 install -e .[jupyter]

# to run the gradio demo:
.venv/bin/pip3 install -e .[gradio]

Publishing new version to PyPI

Production PyPI at: https://pypi.org/

Testing PyPI at: https://test.pypi.org/

  1. Update the version in smashcima/__init__.py.
  2. Build the package make build.
  3. Upload to PyPI make push-prod or TestPyPI make push-test.
  4. When asked, use __token__ for username and paste in the access token for the password (with the pypi- prefix).
  5. Check the version has been uploaded and try its installation.
  6. Submit the version commit and create a release on GitHub.

Note: Don't forget keeping the version at X.Y.Zdev when developing version X.Y.Z. See the smashcima/__init__.py file.

Note: to install from the test pypi, use: pip3 install --index-url https://test.pypi.org/simple/ --no-deps smashcima. More info here.

Packaging and development notes