Open saumya750 opened 11 months ago
Have a look at the docs: https://calamari-ocr.readthedocs.io/en/latest/doc.command-line-usage.html#example-usage The "--files" argument should be "--data.images".
I tried that too but that gives an error with the attribute 'int' in numpy event though my numpy version is 1.26.0 and this error should not occur for this version of numpy, correct? command: calamari-predict --checkpoint D:\PyCharmProjects\calamariOCR\calamari_models-2.0\calamari_models-2.0\antiqua_historical\2.ckpt --data.images C:\Users\Sam\Downloads\test_image4.jpg
Error:
File "d:\pycharmprojects\calamariocr\virtualenv\lib\site-packages\numpy__init.py", line 352, in getattr
raise AttributeError(former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtin int
. To avoid this error in existing code, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.i nt
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Is there some more context in the error message you get? I'm not sure where np.int is accessed from.
This is the entire error that I am getting and I have no idea why it is accessing np.int:
D:\PyCharmProjects\calamariOCR> calamari-predict --checkpoint D:\PyCharmProjects\calamariOCR\calamari_models-2.0\calamari_models-2.0\antiqua_historical\2.ckpt --data.images C:\Users\Sam\Downloads\test_image4.jpg
CRITICAL 2023-09-22 16:02:12,776 tfaip.util.logging: Uncaught exception
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\PyCharmProjects\calamariOCR\virtualenv\Scripts\calamari-predict.exe__main__.py", line 7, in np.int
was a deprecated alias for the builtin int
. To avoid this error in existing code, use int
by itself. Doing this will not modify any behavior and is safe. When replacing np.int
, you may wish to use e.g. np.int64
or np.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Thanks for reporting this! It seems that tfaip for some reason uses np.int. Until we fork tfaip and change it there, we need numpy version < 1.24.
Is there any requirement for open-cv version?Even On using numpy 1.21, I am still getting another error "numpy._DTypeMeta' object is not subscriptable":
Error: CRITICAL 2023-09-22 16:56:27,171 tfaip.util.logging: Uncaught exception
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\PyCharmProjects\calamariOCR\virtualenv\Scripts\calamari-predict.exe__main.py", line 4, in
I guess there are some version requirements between opencv-python-headless and numpy. Did you start with a clean venv or did you install some packages manually?
I am trying to test calamari with my calamari version being 2.2.2 and the below command:
calamari-predict --checkpoint D:\calamariOCR\calamari_models-2.0\calamari_models-2.0\antiqua_historical\2.ckpt --files C:\Users\Sam\Downloads\test_image4.jpg
I am getting below error: File "d:\pycharmprojects\calamariocr\virtualenv\lib\site-packages\paiargparse\main_parser.py", line 93, in parse_args raise UnknownArgumentError(f"Unknown Arguments {' '.join(argv)}. Possible alternatives:{''.join(help_str)}") paiargparse.dataclass_parser.UnknownArgumentError: Unknown Arguments --files C:\Users\Sam\Downloads\test_image4.jpg. Possible alternatives: --files ==> --voter, --data, --verbose
Please help.