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

Trying to use this software, I'm failing please help #5

Closed
MacShrike opened this issue May 3, 2022 · 3 comments
Closed

Trying to use this software, I'm failing please help #5

MacShrike opened this issue May 3, 2022 · 3 comments

Comments

@MacShrike
Copy link

Dear WhiteBreeze,

I'm struggling to get this to work.
First of, I never used python before but I think I managed to get it all up and running.
However I keep getting this out of memory error.
Simple question; do I need more memory =))
This is the end result:
C:\Users\macsh\AppData\Local\Programs\Thonny\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:56: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider'
"Available providers: '{}'".format(name, ", ".join(available_provider_names)))
Traceback (most recent call last):
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\macsh\AppData\Local\Programs\Thonny\Scripts\oemer.exe_main
.py", line 7, in
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\site-packages\oemer\ete.py", line 261, in main
mxl_path = extract(args)
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\site-packages\oemer\ete.py", line 118, in extract
staff, symbols, stems_rests, notehead, clefs_keys = generate_pred(str(img_path))
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\site-packages\oemer\ete.py", line 47, in generate_pred
staff_symbols_map, _ = inference(os.path.join(MODULE_PATH, "checkpoints/unet_big"), img_path)
File "C:\Users\macsh\AppData\Local\Programs\Thonny\lib\site-packages\oemer\inference.py", line 53, in inference
image = cv2.imread(img_path)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-1gnnrwcf\opencv\modules\core\src\alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 673442055 bytes in function 'cv::OutOfMemoryError'

@BreezeWhite
Copy link
Owner

BreezeWhite commented May 6, 2022

You probably need to resize your image to a smaller size, since the error happened while reading the image. Your image has ~640 MB.

@MacShrike
Copy link
Author

Dear Breeze.. WhiteMaster,

Yah, just checked. The image is about 640 Mb.
Doesn't seem that large, in todays day and age.
It was a standard PDF image pull.
What would you recommend as optimal size for the input image size?
Highest regards,
Mac

@BreezeWhite
Copy link
Owner

It's better to have image <10 MB.
Also, oemer doesn't accept PDF file, so you need to transform it into whatever standard image format.

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