JaidedAI/EasyOCR

offline using

paul-yangmy opened this issue · 5 comments

I have downloaded models and set the model_storage_directory to a local path. But it still gave an error like: urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>. Could I use easyocr without internet access? Thanks!

Yes, you can.

Download models "craft_mlt_25k.pth" and your language model "your_lang_model.pth" and put them into folder you want.

In your code call your models that way:

reader = easyocr.Reader(lang_list=['your_lang'], 
                        model_storage_directory='folder1/folder2/models_folder',
)

I think you're just using wrong path. Debug your code, check if script has proper access to your model folder by:

import os

for model_file in os.listdir('path_to_your_model_folder'):
    print(model_file)

still not work :(
image

Delete models (or change models folder) and give easyocr to download everything it wants. Check models that it downloaded. And then try to run detection with models it downloaded offline.

Sorry, it's in an intranet environment, and cannot let easyocr download it by itself. I deployed it according to the local environment. Is there something missing?
image

Sorry, it's in an intranet environment, and cannot let easyocr download it by itself. I deployed it according to the local environment. Is there something missing? image

Sorry, my fault. I download the wrong Chinese lang model :( Thanks!
image