ocrd_all icon indicating copy to clipboard operation
ocrd_all copied to clipboard

Ocropy models only working with full path

Open SB2020-eye opened this issue 4 years ago • 2 comments

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)

SB2020-eye avatar Feb 22 '21 00:02 SB2020-eye

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.)

bertsky avatar Feb 22 '21 00:02 bertsky

@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.

SB2020-eye avatar Mar 13 '21 22:03 SB2020-eye

Fixed by #362

bertsky avatar Jun 20 '23 21:06 bertsky