EasyOCR: Error in easyocr.Reader with urlretrieve(model_url[model_file][0], MODEL_PATH)
Hello! Thanks for that amazing library first of all! Could someone please help to resolve the issue i encountered today only (yesterday and before it was working smoothly).
in my code i have let’s say:
import easyocr
reader = easyocr.Reader(['id', 'en'])
When i run it - i am getting the following error:
CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
MD5 hash mismatch, possible file corruption
Re-downloading the recognition model, please wait
Traceback (most recent call last):
File "tryout_easyocr.py", line 5, in <module>
reader = easyocr.Reader(['id', 'en'])
File "/usr/local/lib/python3.7/site-packages/easyocr/easyocr.py", line 194, in __init__
urlretrieve(model_url[model_file][0], MODEL_PATH)
File "/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 288, in urlretrieve
% (read, size), result)
Regardless what language i choose - i face this error in all the environments:
- in mac os runtime
- in docker
- in ubuntu
- in colab https://colab.research.google.com/github/vistec-AI/colab/blob/master/easyocr.ipynb#scrollTo=lIYdn1woOS1n
Diving deeper it tries to download the following file:
https://www.jaided.ai/read_download/latin.pth
which i wasn’t able to download with wget, curl or browser as well for the same issue.
Seems https://www.jaided.ai/ resets the connection during download
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 21 (13 by maintainers)
I plan to move download part behind Cloudflare and let them handle the traffic.
@Vijayabhaskar96 @rkcosmos I think there is a way to do it like in the spacy package and model for spacy. They just provide models through assets on the GitHub and module for downloading it e.g. https://github.com/explosion/spaCy/releases/tag/v2.3.0 and another option is just google drive (retrieving using https://pypi.org/project/gdown/)
not sure what’s going on. At least website is up. You can also try manual download links from google drive. The links are on README.
cyrillic model
I am running into the same issue [RESOLVED]
It is Download issues that happens due to network overload(multiple people trying to download at the same time) Solved by directly downloading models and place them to %USERPROFILE%/.EasyOCR/model from
detector weight
latin
See https://github.com/JaidedAI/EasyOCR/issues/11