I have (due to some quick hack to check something) my models in a directory $PWD/ocrd-resources, according to the docs:
ocrd-resources
ocrd-resources/ocrd-calamari-recognize
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/3.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/4.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/1.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/0.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/2.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/2.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/4.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/1.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/0.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/3.ckpt.h5
ocrd-calamari-recognize fails to find these:
15:23:53.051 ERROR ocrd.ocrd-calamari-recognize.resolve_resource - Could not find resource 'qurator-gt4histocr-1.0' for executable 'ocrd-calamari-recognize'. Try 'ocrd resmgr download ocrd-calamari-recognize qurator-gt4histocr-1.0' to download this resource.
I believe that the code at
|
candidates.append(join(cwd, fname)) |
should read:
candidates.append(join(cwd, 'ocrd-resources', executable, fname)) # Added 'ocrd-resources', executable
I'm not submitting a PR because I don't know if there are other reasons for leaving out 'ocrd-resources', executable here.
(If I'm putting the models into qurator-gt4histocr-1.0 instead of ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0, it works.)
I have (due to some quick hack to check something) my models in a directory
$PWD/ocrd-resources, according to the docs:ocrd-calamari-recognizefails to find these:I believe that the code at
core/ocrd_utils/ocrd_utils/os.py
Line 68 in d4a8539
I'm not submitting a PR because I don't know if there are other reasons for leaving out
'ocrd-resources', executablehere.(If I'm putting the models into
qurator-gt4histocr-1.0instead ofocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0, it works.)