ocrd_all
ocrd_all copied to clipboard
Ocropy models only working with full path
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
listsLatinHist.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)
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 , 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.
Fixed by #362