always download model itself.
See original GitHub issueI am new to EasyOCR. As the example in Readme.MD, using pip install easyocr, and runing the example. I download the model from model hub, and put into ~/.EasyOCR/model,
$ ls -1 ~/.EasyOCR/model/
english_g2.zip
temp.zip
zh_sim_g2.zip
but, each time I run the code, it always show the downloading. My network is not good, so, the download always interrupted.
$ python3 test1.py
CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
Downloading detection model, please wait. This may take several minutes depending upon your network connection.
Progress: |████----------------------------------------------| 10.0% Complet
Traceback (most recent call last):
File "test1.py", line 5, in <module>
reader = easyocr.Reader(['ch_sim','en']) # this needs to run only once to load the model into memory
File "/usr/local/lib/python3.6/site-packages/easyocr/easyocr.py", line 90, in __init__
download_and_unzip(detection_models[detector_model]['url'], detection_models[detector_model]['filename'], self.model_storage_directory, verbose)
File "/usr/local/lib/python3.6/site-packages/easyocr/utils.py", line 586, in download_and_unzip
urlretrieve(url, zip_path, reporthook=reporthook)
File "/usr/lib64/python3.6/urllib/request.py", line 289, in urlretrieve
% (read, size), result)
urllib.error.ContentTooShortError: <urlopen error retrieval incomplete: got only 9188135 out of 77251756 bytes>
Is there any wrong ? Do I need unzip the file ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Why do random apps keep downloading on my Android device?
This is the most important solution which will help you to stop apps from downloading by themselves on Android phone and tablet. Many...
Read more >Why Is My iPhone Downloading Apps By Itself and How to ...
Disabling Automatic App Downloads. Thankfully, it's very easy to stop your iPhone or iPad from downloading apps automatically. Open the Settings ...
Read more >My file automatically opens instead of saving when I download ...
Click on "Settings" and you'll see a new page pop up in your Chrome browser window. Scroll down to Advanced Settings, click Downloads,...
Read more >How Do I Stop Downloaded Files From Opening Automatically ...
Objective: Stop auto-opening downloads in Chrome; Chrome is trying to open files I download; The error message that file cannot be opened when...
Read more >Change your download settings for Podcasts on iPhone
Turn Enable When Following (under Automatic Downloads) off or on. Tip: To automatically download a particular podcast, open the Podcasts app , touch...
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 Free
Top 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
Thank for your help. It’s working now.
Unzip both the text detection models and the language models and keep them within the same directory. Mention the path of this directory while creating a
easyocr.Reader
object by specifying themodel_storage_directory
parameter. Finally, setdownload_enabled
toFalse
. The last step is the most important because Easyocr will always prefer to download models from its online repository instead of searching the local file system.