moonlight icon indicating copy to clipboard operation
moonlight copied to clipboard

Not able to recognize some images.

Open Aozhi opened this issue 5 years ago • 0 comments

I have print some music scores using MuseScore. However, when I tested these images using moonlight, I got this kind of error message:

/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/numpy/core/fromnumeric.py:3373: RuntimeWarning: Mean of empty slice. out=out, **kwargs) /home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars ret = ret.dtype.type(ret / rcount) Traceback (most recent call last): File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/omr.py", line 105, in tf.app.run() File "/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/tensorflow_core/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/omr.py", line 90, in main output_notesequence=FLAGS.output_type == 'NoteSequence') File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/omr.py", line 67, in run input_pngs, output_notesequence=output_notesequence) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/engine.py", line 116, in run self._get_page(feed_dict={self.png_path: png}) for png in input_pngs) File "/home/benny/.cache/bazel/_bazel_benny/be8eb7a47da6580e14f40472dc81c452/execroot/main/bazel-out/k8-fastbuild/bin/moonlight/omr.runfiles/com_google_protobuf/python/google/protobuf/internal/containers.py", line 386, in extend for message in elem_seq: File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/engine.py", line 116, in self._get_page(feed_dict={self.png_path: png}) for png in input_pngs) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/engine.py", line 177, in _get_page self.glyph_classifier.staffline_extractor) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/page_processors.py", line 64, in process for processor in create_processors(structure, staffline_extractor): File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/page_processors.py", line 58, in create_processors yield barlines.Barlines(structure) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/structure/barlines.py", line 37, in init staff_detector=structure.staff_detector)) File "/home/benny/Applications/moonlight/bazel-bin/moonlight/omr.runfiles/main/moonlight/structure/barlines.py", line 175, in assign_barlines_to_staves barline_staff_start = np.argmin(barline_staff_start_distance, axis=0) File "<array_function internals>", line 6, in argmin File "/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 1269, in argmin return _wrapfunc(a, 'argmin', axis=axis, out=out) File "/home/benny/anaconda2/envs/tf15/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc return bound(*args, **kwds) ValueError: attempt to get argmin of an empty sequence

The test images are shown below:

IMSLP00747-001 ![images](https://user-images.githubusercontent.com/11246073/106414055-a285b900-6486-11eb-99ec-79441779474f.png) ![test-omr-1](https://user-images.githubusercontent.com/11246073/106414058-a6b1d680-6486-11eb-90f9-6ea43935f832.png)

Aozhi avatar Feb 01 '21 04:02 Aozhi