Merge pull request #53 from OCR-D/resolve-resources

Resolve resources
fix/readme-no-checkpoint
Mike Gerber 4 years ago committed by GitHub
commit 53c94fea95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,7 +20,7 @@
"parameters": {
"checkpoint_dir": {
"description": "The directory containing calamari model files (*.ckpt.json). Uses all checkpoints in that directory",
"type": "string", "format": "file", "cacheable": true
"type": "string", "format": "file", "cacheable": true, "default": "qurator-gt4histocr-1.0"
},
"checkpoint": {
"description": "The calamari model files (*.ckpt.json)",

@ -42,8 +42,9 @@ class CalamariRecognize(Processor):
def _init_calamari(self):
if self.parameter.get('checkpoint_dir', None):
self.parameter['checkpoint'] = '%s/*.ckpt.json' % self.parameter['checkpoint_dir']
if not self.parameter.get('checkpoint', None) and self.parameter.get('checkpoint_dir', None):
resolved = self.resolve_resource(self.parameter['checkpoint_dir'])
self.parameter['checkpoint'] = '%s/*.ckpt.json' % resolved
checkpoints = glob(self.parameter['checkpoint'])
self.predictor = MultiPredictor(checkpoints=checkpoints)

@ -3,4 +3,4 @@ tensorflow >= 2.3.0rc2
calamari-ocr == 1.0.*
setuptools >= 41.0.0 # tensorboard depends on this, but why do we get an error at runtime?
click
ocrd >= 2.13.0
ocrd >= 2.22.0

Loading…
Cancel
Save