Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fresh installation unable to process images due to multiple errors #66

Open
incendor opened this issue Dec 1, 2024 · 1 comment
Open

Comments

@incendor
Copy link

incendor commented Dec 1, 2024

Describe the bug

Disclaimers: I'm very much inexperienced when it comes to deep learning tech and have only limited knowledge about python. I stumbled upon this project while researching OMR and would love to work with it. I also know the image provided below is probably far from optimal but from what I can tell, my issues stem from things unrelated to the image. Once processing works, I will be using proper scan images.

For me, installing oemer 0.1.8 (using pip install git+...) in a blank venv does not result in a functioning oemer install and leaves me unable to process images neither with nor without deskew. I have installed CUDA 12.6 and cuDNN 9.5 as required by onnxruntime here and appended what I think are the correct paths to $env:path (see last section).

I get multiple different errors and warnings which I have listed in the traceback section below.

Environment is Windows 11 on 13th gen Intel and a 2070S.


Input Image
input


Full Traceback

WITH DESKEW

  1. Multiple errors/warnings from onnxruntime on "extracting stafflines" and "extracting layers of different symbols":

2024-12-02 00:00:44.4659444 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1539 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\temp\oemer\venv\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-12-02 00:00:44.4733608 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:993 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*, and the latest MSVC runtime. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

  1. RuntimeWarning from numpy on "extracting stafflines":

2024-12-01 23:59:59 Extracting stafflines C:\temp\oemer\venv\Lib\site-packages\numpy\_core\fromnumeric.py:3904: RuntimeWarning: Mean of empty slice. return _methods._mean(a, axis=axis, dtype=dtype, C:\temp\oemer\venv\Lib\site-packages\numpy\_core\_methods.py:147: RuntimeWarning: invalid value encountered in scalar divide ret = ret.dtype.type(ret / rcount)

  1. Numerous inconsistent version warnings from sklearn on "extracting symbols":

C:\temp\oemer\venv\Lib\site-packages\sklearn\base.py:376: InconsistentVersionWarning: Trying to unpickle estimator SVC from version 1.2.0 when using version 1.5.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations warnings.warn(

  1. AssertionError: 4 on "building MusicXML document":

2024-12-02 00:00:11 Building MusicXML document Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\temp\oemer\venv\Scripts\oemer.exe\__main__.py", line 7, in <module> File "C:\temp\oemer\venv\Lib\site-packages\oemer\ete.py", line 287, in main mxl_path = extract(args) ^^^^^^^^^^^^^ File "C:\temp\oemer\venv\Lib\site-packages\oemer\ete.py", line 215, in extract builder.build() File "C:\temp\oemer\venv\Lib\site-packages\oemer\build_system.py", line 574, in build self.gen_measures(group_container) File "C:\temp\oemer\venv\Lib\site-packages\oemer\build_system.py", line 692, in gen_measures mm = gen_measure(buffer, grp, num, at_beginning, double_barline) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\temp\oemer\venv\Lib\site-packages\oemer\build_system.py", line 741, in gen_measure mm.align_symbols() File "C:\temp\oemer\venv\Lib\site-packages\oemer\build_system.py", line 299, in align_symbols assert track_nums == 2, track_nums ^^^^^^^^^^^^^^^ AssertionError: 4

WITHOUT DESKEW

  1. Multiple errors/warnings from onnxruntime on "extracting stafflines" and "extracting layers of different symbols":

2024-12-02 00:00:44.4659444 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1539 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "C:\temp\oemer\venv\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-12-02 00:00:44.4733608 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:993 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*, and the latest MSVC runtime. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

  1. RuntimeWarning from numpy on "extracting stafflines":

2024-12-01 23:59:59 Extracting stafflines C:\temp\oemer\venv\Lib\site-packages\numpy\_core\fromnumeric.py:3904: RuntimeWarning: Mean of empty slice. return _methods._mean(a, axis=axis, dtype=dtype, C:\temp\oemer\venv\Lib\site-packages\numpy\_core\_methods.py:147: RuntimeWarning: invalid value encountered in scalar divide ret = ret.dtype.type(ret / rcount)

  1. Numerous inconsistent version warnings from sklearn on "extracting symbols":

C:\temp\oemer\venv\Lib\site-packages\sklearn\base.py:376: InconsistentVersionWarning: Trying to unpickle estimator SVC from version 1.2.0 when using version 1.5.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to: https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations warnings.warn(

  1. Out of bounds error on "extracting rhythm types":

2024-12-02 00:03:05 Extracting rhythm types index 1438 is out of bounds for axis 1 with size 1438

  1. Overflow warning on "building MusicXML document":

C:\temp\oemer\venv\Lib\site-packages\oemer\build_system.py:661: RuntimeWarning: overflow encountered in scalar subtract diff = last_pos - cur_pos

  1. Multiple "not a valid note" errors:

2024-12-02 00:03:11 Note 0 is not a valid note. 2024-12-02 00:03:11 Note 6 is not a valid note. 2024-12-02 00:03:11 Note 9 is not a valid note. 2024-12-02 00:03:11 Note 18 is not a valid note. [...]


Command You Execute
oemer C:\temp\oemer\input.jpg and/or oemer C:\temp\oemer\input.jpg --without-deskew


Setup details
$env:path (manually added entries only)

[...]
C:\Program Files\NVIDIA\CUDNN\v9.5\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\libnvvp;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\extras;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include;
C:\Program Files\NVIDIA\CUDNN\v9.5\bin;
C:\Program Files\NVIDIA\CUDNN\v9.5\include;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\extras\CUPTI\lib64;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\extras\CUPTI\include;
[...]
@BreezeWhite
Copy link
Owner

The second one of your run should has been successfully executed, and there should be an MusicXML file. For the first run with deskew, there are several checks cannot be passed while parsing the symbols, and thus failed to process and output nothing.
For a better work around, you could take other photos of the same sheet and try processing again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants