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

Ocropy models only working with full path #241

Closed
SB2020-eye opened this issue Feb 22, 2021 · 3 comments
Closed

Ocropy models only working with full path #241

SB2020-eye opened this issue Feb 22, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@SB2020-eye
Copy link
Contributor

Hi. This is just fyi, since I eventually got my scripts to work.

I've been trying out ocrd-cis-ocropy-recognize for the first time. Unlike my experience with the sbb and tesserocr tools and models, the name for model wouldn't work for me with ocropy. Eventually I figured to try the full path, and it worked.

(So, eg,

  • ocrd resmgr list-installed lists LatinHist.pyrnn.gz

  • ocrd-cis-ocropy-recognize -I OCR-D-SEG19 -O OCR-D-SEG26 -P textequiv_level glyph -P model LatinHist.pyrnn.gz returns

    raise FileNotFound(fname)
ocrd_cis.ocropy.ocrolib.exceptions.FileNotFound: file not found LatinHist.pyrnn.gz
  • ocrd-cis-ocropy-recognize -I OCR-D-SEG19 -O OCR-D-SEG26 -P textequiv_level glyph -P model ~/.local/share/ocrd-resources/ocrd-cis-ocropy-recognize/LatinHist.pyrnn.gz works)
@bertsky
Copy link
Collaborator

bertsky commented Feb 22, 2021

Thanks for your report!

Note that there's already a solution for this in the line in ocrd_cis, but before we can adapt ocrd_cis to the new resmgr I'll have to clear away some unfinished work in that repo.

In the meantime, besides absolute paths, relative paths still work under the old resolution scheme.

(We could transfer the issue to ocrd_cis, but since we already have the PR there, let's keep it here until we can merge ocrd_cis' fixed master again.)

@SB2020-eye
Copy link
Contributor Author

@bertsky , I'm not in a rush. But if you think of it, it would be great if you could report back here when this happens. (And I'll additionally know to close the issue.) Thanks.

@kba kba added the bug Something isn't working label Aug 31, 2021
@bertsky
Copy link
Collaborator

bertsky commented Jun 20, 2023

Fixed by #362

@bertsky bertsky closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants