This is a new version of the repository. Do let us know (lindat-help at ufal.mff.cuni.cz) if you encounter any issues.
 

Smashcima (2025-03-28)

Please use the following text to cite this item or export to a predefined format:
Mayer, Jiří; Pecina, Pavel and Hajič jr., Jan, 2024, Smashcima (2025-03-28), LINDAT/CLARIAH-CZ digital library at the Institute of Formal and Applied Linguistics (ÚFAL), http://hdl.handle.net/11234/1-5878.
Date issued
2024-12-30
Description
Smashcima is a library and framework for synthesizing images containing handwritten music for creating synthetic training data for OMR models. It is primarily intended to be used as part of optical music recognition workflows, esp. with domain adaptation in mind. The target user is therefore a machine-learning, document processing, library sciences, or computational musicology researcher with minimal skills in python programming. Smashcima is the only tool that simultaneously: - synthesizes handwritten music notation, - produces not only raster images but also segmentation masks, classification labels, bounding boxes, and more, - synthesizes entire pages as well as individual symbols, - synthesizes background paper textures, - synthesizes also polyphonic and pianoform music images, - accepts just MusicXML as input, - is written in Python, which simplifies its adoption and extensibility. Therefore, Smashcima brings a unique new capability for optical music recognition (OMR): synthesizing a near-realistic image of handwritten sheet music from just a MusicXML file. As opposed to notation editors, which work with a fixed set of fonts and a set of layout rules, it can adapt handwriting styles from existing OMR datasets to arbitrary music (beyond the music encoded in existing OMR datasets), and randomize layout to simulate the imprecisions of handwriting, while guaranteeing the semantic correctness of the output rendering. Crucially, the rendered image is provided also with the positions of all the visual elements of music notation, so that both object detection-based and sequence-to-sequence OMR pipelines can utilize Smashcima as a synthesizer of training data. (In combination with the LMX canonical linearization of MusicXML, one can imagine the endless possibilities of running Smashcima on inputs from a MusicXML generator.)
Acknowledgement

Version History

Showing 1 - 2 out of 2 results
VersionDateSummary
2*
2024-12-30 00:00:00
2024-12-30 00:00:00
* Selected version
This item isPublicly Available
and licensed under:
 Files in this item
Name
Smashcima-1.1.0_user-documentation.pdf
Size
880.05 KB
Format
application/pdf
Description
Adobe PDF
MD5
567cade94a22dc1b0f3c09adc09f1f0b
Preview
  File Preview
Name
Smashcima-1.1.0_technical-documentation.pdf
Size
3.17 MB
Format
application/pdf
Description
Adobe PDF
MD5
acdf263a32ac0a2027269d064b787c97
Preview
  File Preview
Name
Smashcima_1.1.0_OmniOMR-AssetBundles.zip
Size
20.77 MB
Format
application/zip
Description
Zip
MD5
5211b29487c40ca76a925a4f07071ce3
Preview
  File Preview
Name
Smashcima-1.1.0.zip
Size
1.88 MB
Format
application/zip
Description
Zip
MD5
9ad51d621ba9cc24a120e827d9df2064
Preview
  File Preview
  • Smashcima-main
    • README.md5 kB
    • .gitignore3 kB
    • tests
      • __main__.py293 B
      • __init__.py0 B
      • scene
        • NameofViaDummyTest.py564 B
        • SceneObjectRelationshipQueriesTest.py4 kB
        • __init__.py0 B
      • orchestration
        • ContainerTest.py5 kB
        • __init__.py0 B
    • shark_tank
      • __main__.py524 B
      • MusicXmlLoaderTest.py675 B
      • sharks
        • musicxml
          • 20250212_omr-output-chords.musicxml131 kB
          • 20240520_lc6247269.musicxml542 kB
      • __init__.py0 B
      • BaseSharkTankCase.py990 B
    • Makefile1 kB
    • jupyter
      • dev
        • mxl_loader.ipynb1 kB
        • base_handwritten_model.ipynb1 kB
      • exporting
        • bitmap_rendering.ipynb2 kB
        • svg_exporting.ipynb2 kB
        • postprocessing.ipynb2 kB
      • assets
      • notation_synthesis
        • leger_lines.musicxml17 kB
        • beams.ipynb1 kB
        • duration_dots.ipynb1 kB
        • stems.musicxml11 kB
        • rests.musicxml11 kB
        • flags.musicxml9 kB
        • rests.ipynb1 kB
        • leger_lines.ipynb1 kB
        • notehead_placement.musicxml30 kB
        • accidentals.musicxml15 kB
        • stems.ipynb1 kB
        • beams.musicxml28 kB
        • duration_dots.musicxml9 kB
        • notehead_placement.ipynb1 kB
        • accidentals.ipynb1 kB
        • flags.ipynb1 kB
      • docs
        • tutorial-2.ipynb3 kB
        • tutorial-3.ipynb5 kB
        • scene-objects.ipynb3 kB
        • tutorial-4.ipynb2 kB
        • affine-spaces-and-rendering.ipynb2 kB
        • tutorial-1.ipynb1 kB
    • .vscode
      • settings.json125 B
    • docs_builder
      • Fragment.py3 kB
      • .gitignore68 B
      • user-docs-fragments.txt414 B
      • __main__.py3 kB
      • logos
        • omniomr-logo.png33 kB
        • omniomr-logo.png~161 kB
        • ufal-logo.png12 kB
      • toc-user-docs.md423 B
      • requirements.txt22 B
      • introduction.md3 kB
      • toc-technical-docs.md1 kB
      • github-markdown.css13 kB
      • cover-page.md827 B
      • technical-docs-fragments.txt644 B
    • pyproject.toml1 kB
    • docs
      • asset-bundles.md2 kB
      • affine-spaces-and-rendering.md10 kB
      • checklists
        • deploying-gradio-demo.md1 kB
        • publishing-to-pypi.md1 kB
      • glyphs.md3 kB
      • tutorials
        • 2-changing-background-texture.md5 kB
        • 3-using-custom-glyphs.md10 kB
        • 4-postprocessing.md2 kB
        • 1-producing-music-notation-images.md4 kB
      • music-notation-synthesizer.md2 kB
      • scene-objects.md16 kB
      • models-and-service-orchestration.md13 kB
      • glyph-synthesizer.md6 kB
      • rendering-via-bitmap-renderer.md1 kB
      • determining-scanned-artifact-dpi.md2 kB
      • compositing.md4 kB
      • line-glyphs.md1 kB
      • postprocessing.md5 kB
      • design-overview.md6 kB
      • assets
        • readme-example.jpg66 kB
        • design-overview
          • smashcima-top-level-architecture.svg402 kB
          • smashcima-architecture.svg1 MB
        • line-glyphs
          • smufl_stem.png403 B
          • smashcima_beamHook.png176 B
          • smashcima_beam.png271 B
          • smufl_brace.png2 kB
          • smashcima_legerLine.png191 B
          • smufl_bracket.png3 kB
        • tutorial-4
          • postprocessed_thumb.jpg33 kB
        • scene-objects
          • note-list-graph.png41 kB
          • containers-graph.png79 kB
          • note-color-graph.png21 kB
        • tutorial-3
          • red-circles_thumb.jpg43 kB
        • glyphs
          • smufl_accidentalFlat.png414 B
          • smufl_rest8th.png434 B
          • smufl_accidentalDoubleSharp.png252 B
          • smufl_fClef.png712 B
          • smufl_noteheadWhole.png301 B
          • smufl_flag8thDown.png291 B
          • smufl_flag8thUp.png305 B
          • smufl_restQuarter.png401 B
          • smufl_accidentalSharp.png641 B
          • smufl_timeSigCommon.png449 B
          • smufl_timeSig2.png350 B
          • smufl_flag16thDown.png377 B
          • smufl_restWhole.png278 B
          • smufl_flag16thUp.png321 B
          • smufl_augmentationDot.png106 B
          • smufl_noteheadBlack.png202 B
          • smufl_timeSig4.png428 B
          • smufl_gClef.png1 kB
          • smufl_restHalf.png233 B
          • smufl_cClef.png1 kB
          • smufl_rest16th.png459 B
          • smufl_articStaccatoBelow.png122 B
          • smufl_accidentalNatural.png395 B
        • smashcima-logo.svg26 kB
        • tutorial-1
          • page_1_thumb.jpg38 kB
          • page_0_svg.jpg42 kB
          • page_0_thumb.jpg33 kB
          • lc5003150.musicxml170 kB
        • compositing
          • default-compositor-pipeline.svg836 kB
      • synthesizer-interfaces.md2 kB
      • todo-list.md2 kB
      • development-setup.md3 kB
    • Dockerfile1 kB
    • gradio_demo
      • DemoModel.py5 kB
      • __main__.py8 kB
      • __init__.py0 B
      • utils.py575 B
      • asset_bundles.py2 kB
    • testing
      • .gitignore25 B
      • input.mscz3 kB
      • input.musicxml5 kB
    • LICENSE11 kB
    • smashcima
      • __init__.py1 kB
      • jupyter
        • __init__.py0 B
        • display_glyphs.py1 kB
        • display_scene_graph.py3 kB
      • loading
        • load_score.py1 kB
        • MusicXmlLoader.py23 kB
        • __init__.py78 B
      • synthesis
        • __init__.py501 B
        • StafflinesSynthesizer.py898 B
        • style
          • OmniOMRStyleDomain.py547 B
          • StyleDomain.py782 B
          • MuscimaPPStyleDomain.py1 kB
          • MzkPaperStyleDomain.py1 kB
          • __init__.py172 B
          • RepositoryStyleDomain.py1 kB
          • Styler.py2 kB
        • MusicNotationSynthesizer.py1 kB
        • GlyphSynthesizer.py2 kB
        • PageSynthesizer.py618 B
        • page
          • SolidColorPaperSynthesizer.py1 kB
          • Quilter.py5 kB
          • __init__.py260 B
          • NaiveStafflinesSynthesizer.py3 kB
          • MzkQuiltingPaperSynthesizer.py1 kB
          • SimplePageSynthesizer.py3 kB
        • glyph
          • OmniOMRGlyphSynthesizer.py1 kB
          • RepositoryLineSynthesizer.py3 kB
          • OmniOMRLineSynthesizer.py1 kB
          • MuscimaPPLineSynthesizer.py1 kB
          • RepositoryGlyphSynthesizer.py3 kB
          • __init__.py244 B
          • MuscimaPPGlyphSynthesizer.py2 kB
          • NaiveLineSynthesizer.py1 kB
        • notation
          • column
            • Column.py1 kB
            • __init__.py0 B
            • BarlinesColumn.py1 kB
            • ColumnBase.py4 kB
            • ClefsColumn.py2 kB
            • Skyline.py3 kB
            • EventColumn.py2 kB
            • AugmentationDotsColumn.py7 kB
            • ColumnMusicNotationSynthesizer.py16 kB
            • NoteheadsColumn.py12 kB
            • RestsColumn.py4 kB
            • AccidentalsColumn.py4 kB
          • __init__.py135 B
          • BeamStemSynthesizer.py13 kB
        • PaperSynthesizer.py633 B
        • LineSynthesizer.py4 kB
      • assets
        • AssetBundle.py3 kB
        • textures
          • mzk_paper_patches.csv1 kB
          • mzk-blank-uuids.txt6 kB
          • __init__.py0 B
          • MzkPaperPatches.py3 kB
        • download_file.py1 kB
        • glyphs
          • mung
            • extraction
              • ExtractedBag.py1 kB
              • MungDocument.py888 B
              • BaseSymbolExtractor.py17 kB
              • MungSymbolExtractor.py13 kB
              • mung_mask_to_smashcima_sprite_bitmap.py474 B
              • get_line_endpoints.py1 kB
              • PointCloud.py2 kB
              • accidentals.py4 kB
            • MungGlyphMetadata.py968 B
            • utils
              • link_stafflines_to_staves.py1 kB
              • link_nodes_to_staves.py1 kB
              • get_new_node_id.py265 B
            • README.md820 B
            • repository
              • MungSymbolRepository.py2 kB
              • PackedGlyph.py1 kB
              • GlyphsIndex.py1 kB
              • LineGlyphsIndex.py1 kB
              • PackedLineList.py1 kB
              • PackedLineGlyph.py1 kB
          • __init__.py0 B
          • muscima_pp
            • get_symbols.py25 kB
            • __main__.py743 B
            • __init__.py0 B
            • MppGlyphMetadata.py1 kB
            • MuscimaPPGlyphs.py5 kB
            • PointCloud.py789 B
            • MppPage.py3 kB
          • omni_omr
            • OmniOMRGlyphs.py4 kB
            • __main__.py733 B
            • OmniOMRSymbolExtractor.py4 kB
            • dpi_values.csv6 kB
            • OmniOMRGlyphMetadata.py1 kB
        • datasets
          • MuscimaPP.py1 kB
          • OmniOMRProto.py1 kB
        • __init__.py0 B
        • AssetRepository.py2 kB
      • scene
        • ScenePoint.py1 kB
        • SmuflLabels.py11 kB
        • nameof_via_dummy.py617 B
        • semantic
          • Pitch.py3 kB
          • ScoreEvent.py1 kB
          • TimeSignature.py972 B
          • Note.py339 B
          • BeamValue.py318 B
          • RestSemantic.py380 B
          • Event.py1 kB
          • ClefSign.py297 B
          • StaffSemantic.py778 B
          • Clef.py2 kB
          • Score.py3 kB
          • Chord.py2 kB
          • ScoreMeasure.py1 kB
          • BeamedGroup.py2 kB
          • MeasureRest.py691 B
          • TypeDuration.py1 kB
          • AttributesChange.py929 B
          • Part.py2 kB
          • AccidentalValue.py427 B
          • Attributes.py2 kB
          • KeySignature.py551 B
          • Measure.py3 kB
          • Durable.py669 B
          • __init__.py798 B
          • StemValue.py616 B
        • ComposedGlyph.py3 kB
        • AffineSpaceVisitor.py1 kB
        • Sprite.py9 kB
        • Glyph.py4 kB
        • SmashcimaLabels.py2 kB
        • ViewBox.py411 B
        • AffineSpace.py1 kB
        • LabeledRegion.py696 B
        • Scene.py2 kB
        • SceneObject.py6 kB
        • visual
          • StaffVisual.py1 kB
          • AugmentationDot.py903 B
          • LedgerLine.py1 kB
          • StaffCoordinateSystem.py807 B
          • SystemMeasure.py867 B
          • NoteheadSide.py246 B
          • Flag.py438 B
          • Stem.py1 kB
          • BeamCoordinateSystem.py2 kB
          • RestVisual.py3 kB
          • Beam.py823 B
          • System.py716 B
          • Accidental.py467 B
          • Notehead.py1 kB
          • Page.py645 B
          • StaffMeasure.py1 kB
          • BeamHook.py898 B
          • __init__.py598 B
        • __init__.py955 B
        • LineGlyph.py1 kB
        • Region.py1 kB
      • config.py536 B
      • orchestration
        • Model.py5 kB
        • Container.py4 kB
        • BaseHandwrittenModel.py9 kB
        • __init__.py206 B
        • OmniOMRModel.py1 kB
      • random_between.py230 B
      • geometry
        • __init__.py242 B
        • Point.py862 B
        • Polygon.py1 kB
        • Transform.py3 kB
        • Quad.py1 kB
        • units.py575 B
        • Contours.py824 B
        • Vector2.py2 kB
        • Rectangle.py4 kB
      • _version.py106 B
      • exporting
        • DebugGlyphRenderer.py902 B
        • MungExporter.py1 kB
        • BitmapRenderer.py1 kB
        • __init__.py724 B
        • SvgExporter.py7 kB
        • image
          • LayerSet.py819 B
          • ImageLayer.py2 kB
          • Canvas.py4 kB
          • ImageLayerBuilder.py5 kB
          • __init__.py142 B
        • compositing
          • DefaultCompositor.py6 kB
          • __init__.py84 B
          • Compositor.py609 B
        • postprocessing
          • Filter.py1 kB
          • Postprocessor.py726 B
          • BaseHandwrittenPostprocessor.py13 kB
          • __init__.py225 B
          • FilterStack.py449 B
          • NullPostprocessor.py455 B