Wonderingkaho's Blog.

The installation of Moonlight (OMR)

字数统计: 188阅读时长: 1 min
2019/05/11 Share

An experimental optical music recognition engine.
Moonlight reads PNG image(s) containing sheet music and outputs MusicXML or a NoteSequence message. MusicXML is a standard sheet music interchange format, and NoteSequence is used by Magenta for training generative music models.

Command-Line Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
git clone https://github.com/tensorflow/moonlight
cd moonlight
# You may want to run this inside a virtualenv.
pip install -r requirements.txt
# Build the OMR command-line tool.
bazel build moonlight:omr
# Prints a Score message.
bazel-bin/moonlight/omr moonlight/testdata/IMSLP00747-000.png
# Scans several pages and prints a NoteSequence message.
bazel-bin/moonlight/omr --output_type=NoteSequence IMSLP00001-*.png
# Writes MusicXML to ~/mozart.xml.
bazel-bin/moonlight/omr --output_type=MusicXML --output=$HOME/mozart.xml \
corpus/56/IMSLP56442-*.png

While the installation, I met a problem that it throw a problem:

图片

I used follow steps and resolved this problem:

  1. Reduced version:
    pip install --upgrade --force-reinstall pip==9.0.3

  2. Tried to re-install package:
    pip install apache-beam==2.5.0 --disable-pip-version-check

  3. At last, recover the latest version for pip:
    pip install --upgrade pip

The reason of the problem below:

图片

Finally

图片

CATALOG
  1. 1. Command-Line Usage
    1. 1.1. While the installation, I met a problem that it throw a problem:
  2. 2. Finally