1
0
Fork 0
mirror of https://github.com/mikegerber/ocrd_calamari.git synced 2025-06-11 20:59:52 +02:00

use Processor.resolve_files to handle on-demand download of models via registry

This commit is contained in:
Konstantin Baierer 2020-12-22 19:11:44 +01:00
parent d6804bd9c3
commit 00e43b1d1f
2 changed files with 3 additions and 2 deletions

View file

@ -41,7 +41,8 @@ class CalamariRecognize(Processor):
os.environ['TF_CPP_MIN_LOG_LEVEL'] = TF_CPP_MIN_LOG_LEVEL
if self.parameter.get('checkpoint_dir', None):
self.parameter['checkpoint'] = '%s/*.ckpt.json' % self.parameter['checkpoint_dir']
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)

View file

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