ocropus-archive / DUP-ocropy

Python-based tools for document analysis and OCR
Apache License 2.0
3.42k stars 591 forks source link

Cannot find OCR model file #298

Closed tulang-nb2022 closed 6 years ago

tulang-nb2022 commented 6 years ago

I am trying to run ./ocropus -rpred -m en-default.pyrnn.gz book/0001/*.png

as part of a simple tutorial but the program complains that

ERROR: Cannot find OCR model file:en-default.pyrnn.gz

ERROR: Download a model and put it into:/usr/local/share/ocropus/

ERROR: (Or override the location with OCROPUS_DATA.)

I have put that file in both "ocropus_venv\ocropy-master\models" and "ocropus_venv\share\ocropus" folders in both the gunzipped and ungunzipped forms and the system still complains. All other previous commands to perform binarization and segmentation passed as expected.

Many thanks in advance!!

zuphilip commented 6 years ago

Did you run ./setup.py again?

rogerfitz commented 6 years ago

Just had same issue. tried wget from command line and http://www.tmbdev.net/en-default.pyrnn.gz did not resolve. Tried again in browser same thing...

But then it looks like the server "woke up" and started responding instantly -- after the web browser request. Potentially took 1 minute. I've experienced this coming from using heroku free servers that go to sleep if no requests within a time window. not sure if that is the same reason why tmbdev.net is acting funny

zuphilip commented 6 years ago

I saved the models also here https://github.com/zuphilip/ocropy-models if problems remains.

tulang-nb2022 commented 6 years ago

Never mind, I got it to work by specifying "current directory" with ./en-default.pyrnn

Thanks for the response though!!