ValueError: zero-size array to reduction operation maximum which has no identity
See original GitHub issueHello! During the recognition process the following error is thrown and the recognition effectively stops proceeding, while the Status still reads “Status: ERROR: The process is still running” (OCR4all ver 0.3.0, LAREX ver 0.3.1):
Process ForkProcess-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/datasets/input_dataset.py", line 99, in run
out = self.apply_single(*data)
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/datasets/input_dataset.py", line 119, in apply_single
line, params = self.params.data_processor.apply([line], 1, False)[0]
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/data_processing/data_preprocessor.py", line 19, in apply
processes=processes, progress_bar=progress_bar, max_tasks_per_child=max_tasks_per_child)
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/utils/multiprocessing.py", line 32, in parallel_map
out = list(map(f, d))
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/data_processing/data_preprocessor.py", line 50, in _apply_single
data, params = proc._apply_single(data)
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/data_processing/data_preprocessor.py", line 50, in _apply_single
data, params = proc._apply_single(data)
File "/usr/local/lib/python3.6/dist-packages/calamari_ocr-1.0.5-py3.6.egg/calamari_ocr/ocr/data_processing/center_normalizer.py", line 15, in _apply_single
out, params = self.normalize(data, cval=np.amax(data))
File "<__array_function__ internals>", line 6, in amax
File "/usr/local/lib/python3.6/dist-packages/numpy/core/fromnumeric.py", line 2668, in amax
keepdims=keepdims, initial=initial, where=where)
File "/usr/local/lib/python3.6/dist-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
I have attached the PAGEXML and image files where the error occurs. I couldn’t find anything suspicious here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Overcome ValueError for empty array - python - Stack Overflow
ValueError: zero-size array to reduction operation minimum which has no identity. because the array is empty. How to work around it, ...
Read more >zero-size array to reduction operation minimum which has no ...
value error when I use set_data() on a mrc file Traceback (most recent call last): File "test_crop_img.py", line 31, ...
Read more >Valueerror: zero-size array to reduction ... - CodeProject
ValueError : zero-size array to reduction operation maximum which has no identity <pre> The message implies that <code>y_train</code> does not ...
Read more >zero-size array to reduction operation minimum which has no ...
It's because of your cropped image. it is an empty array or has an empty dimention. Take a look at the shapes of...
Read more >Zero-size array to reduction operation maximum which has no ...
Hello @Hrishikesh. pawar , You have only one data sample with a total length of 0s.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hope this helps …
0125.zip
Thank you for the files. I sadly couldn’t reproduce the broken coordinates when converting to latest with the supplied legacy files but we’ll keep looking into this issue.