Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.9 instead.
Reason given by maintainers: Release numbering was corrected to match the GitHub release series.

Sheet-Music-Recognition — Optical Music Recognition

Convert sheet-music images and scanned PDFs to MusicXML, MIDI, JSON and MP3 with offline optical music recognition (OMR). Sheet-Music-Recognition includes downloadable model weights, a Java decoder and a Python API and command-line tool, available as score-reader (PyPI package and command) and sheet_music_recognition (Python import).

Build and test License: Apache-2.0

Quick start · Review demo · Benchmark · Documentation · Python / Java API · Downloads

Code and weights are Apache-2.0 licensed, including commercial and closed-source use. You do not need to publish your own code. Follow the license and notice requirements.

Install and use

Requires Python 3.10 or 3.11 and Java 17+ on your PATH (or via JAVA_HOME).

python -m pip install "score-reader[pdf,audio]"
score-reader --demo --output scale.json --musicxml scale.musicxml --midi scale.mid --mp3 scale.mp3
Original sample Rendered MusicXML
Original two-measure scale Engraved MusicXML from the conversion

Play or download the MP3 · Inspect the note overlay · Download the sample MusicXML

Read a score

score-reader score.png --output score.json --midi preview.mid --musicxml score.musicxml

Use an image or PDF as input. JSON output is required; MIDI, MusicXML and MP3 exports are optional. For example, with the extras installed:

score-reader score.pdf --output score.json --mp3 preview.mp3

MP3 previews use a basic synthesized tone. The audio extra supplies an FFmpeg encoder. You can also use an existing FFmpeg installation.

Use --pages 1,2,3 to select PDF pages, --meter 3/4 for the initial meter, --bpm 90 for the initial quarter-note tempo, or --key-fifths 2 for two sharps. The default meter and tempo are 4/4 and 120 BPM. Run score-reader --help for all options.

Processing runs locally. See API and output details for Python/Java integration and export behavior, or GitHub releases for standalone JAR and model downloads.

What it supports

  • Scores. Printed staff notation for piano, violin, and ensembles, including independently barred staves.
  • Notation. Notes, chords, rests, clefs, accidentals, ties, slurs, grace notes, and dynamics. Reads repeats and endings, plus changes in key, meter, and tempo.
  • Playback. MIDI and synthesized MP3 previews can follow recognized ritardandos, fermatas, tremolos, and piano pedal brackets. Playback details
  • Guitar tab. Six- and seven-string tab with tuning headers, written rhythms including triplets, and effects such as hammer-ons, pull-offs, slides, bends, and vibrato. When rhythm is missing, the reader estimates it. Tab details · Guitar effects
  • Exports. MusicXML reconstructs an editable concert-pitch score and leaves out the original page layout and tab placement. JSON includes note events and page geometry. Export formats

Integration and model

Use Interpreter and write_musicxml from Python, or SheetInterpreter.analyze() from Java. See API examples and output format. An optional native Java decoding service supports bounded, source-matched geometry and analysis requests from local workers. The Python reader runs bundled-model OCR automatically on images and scanned PDFs. The separate shared Java OCR pipeline and optional ONNX binding remain available for cross-platform evaluation. The optional desktop ONNX segmentation adapter uses the pinned v3 conversion without changing the default Python model.

The bundled v4 model comes from our own synthetic training lineage, without pretrained weights or commercial score scans. See the model card, evaluation, training guide and source origins.

Development

To build from source, clone the repository and activate a Python 3.10 or 3.11 virtual environment. With JDK 17+ installed, run:

python scripts/build_java.py
python -m pip install ".[pdf,audio]"

Then run the checks:

python scripts/test_java.py
python -m unittest discover -s tests
python scripts/smoke_test.py

Use python scripts/test_java.py --jobs 4 in place of the serial Java test command to run every class once across four isolated JVMs. Each parallel JVM defaults to a 512 MiB heap; per-batch logs and results are saved under build/test-parallel. A failed batch makes the command fail.

Bug reports and contributions are welcome. Use shareable examples and keep private logs and commercial scores out of public posts. See CONTRIBUTING.md.

Pickup caller integration regression

After building the Java core, run the original numeric/content cases against the actual standalone pickup call:

python scripts/check_pickup_ingress.py --public . --classpath src/sheet_music_recognition/interpreter.jar --out build/pickup-ingress

Use a new output directory on each run. Maintainers can add --app <app-worktree> and use its matching core classpath to check the exact Android and native caller expressions too. This compiles source slices with current helper sources; it does not run Android, image recognition or a packaged worker. The fixtures contain no score images or private data.

Metadata

Release files for score-reader 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Built distribution (wheel)

Table of built distributions (wheels) for score-reader 0.2.0
File Interpreter ABI Platform Actions
score_reader-0.2.0-py3-none-any.whl Python 3 none any Details for score_reader-0.2.0-py3-none-any.whl

Release files / score_reader-0.2.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL score_reader-0.2.0-py3-none-any.whl
Size 8.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
771944d7fc27ce7e716b7399e9d6ea3596fe9f8acabad034d8a45be7fffce989
BLAKE2b-256 checksum
How to use checksums
b7a103249c7acad6c3c47f6518bbab6a39f055c8558a23c1d2aeda5a1b17be25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for score-reader 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Attestation for score_reader-0.2.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file Change of provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page