You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# zsh shell
Using CPU. Note: This module is much faster with a GPU.
Traceback (most recent call last):
File "detect.py", line 3, in<module>
reader = easyocr.Reader(["en"], gpu=False)
File "/Users/noopy/.pyenv/versions/ocr/lib/python3.8/site-packages/easyocr/easyocr.py", line 171, in __init__
self.detector = get_detector(DETECTOR_PATH, self.device)
File "/Users/noopy/.pyenv/versions/ocr/lib/python3.8/site-packages/easyocr/detection.py", line 59, in get_detector
net.load_state_dict(copyStateDict(torch.load(trained_model, map_location=device)))
File "/Users/noopy/.pyenv/versions/ocr/lib/python3.8/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/Users/noopy/.pyenv/versions/ocr/lib/python3.8/site-packages/torch/serialization.py", line 780, in _legacy_load
deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 2304602 more bytes. The file might be corrupted.
I've ran with Korean language, and switched images also.
Any candidates for the cause of EOF error?
The text was updated successfully, but these errors were encountered:
I think model file is not downloaded successfully, update to last version (v1.1.2) and re-download file should fix the issue. If automatic download does not work for any reason, you can also download model file manually.
Development Environment
How to replicate the error
Set up Virtual Environment and Dependencies
# zsh shell pyenv virtualenv 3.8.3 OCR pyenv activate OCR
Install easyocr via poetry
Run Python File
Image source
# zsh shell python detect.py
I've ran with Korean language, and switched images also.
Any candidates for the cause of EOF error?
The text was updated successfully, but these errors were encountered: