Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offline using #1332

Open
paul-yangmy opened this issue Nov 14, 2024 · 5 comments
Open

offline using #1332

paul-yangmy opened this issue Nov 14, 2024 · 5 comments

Comments

@paul-yangmy
Copy link

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!

@romanvelichkin
Copy link

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)

@paul-yangmy
Copy link
Author

still not work :(
image

@romanvelichkin
Copy link

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.

@paul-yangmy
Copy link
Author

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

@paul-yangmy
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants