mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-09 03:39:55 +02:00
commit
53c94fea95
3 changed files with 5 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue