1
0
Fork 0
mirror of https://github.com/mikegerber/ocrd_calamari.git synced 2025-06-10 04:09:53 +02:00

🚧 Do not hardcode used models

This commit is contained in:
Gerber, Mike 2019-08-08 17:26:02 +02:00
parent 8cfb075a6d
commit ebf0d53640
3 changed files with 16 additions and 2 deletions

View file

@ -18,7 +18,7 @@
"OCR-D-OCR-CALAMARI"
],
"parameters": {
"XXX checkpoint": {"type": "string", "format": "file", "cacheable": true},
"checkpoint": {"type": "string", "format": "file", "cacheable": true},
"voter": {"type": "string", "default": "confidence_voter_default_ctc"}
}
}

View file

@ -27,7 +27,7 @@ class CalamariRecognize(Processor):
def _init_calamari(self):
os.environ['TF_CPP_MIN_LOG_LEVEL'] = TF_CPP_MIN_LOG_LEVEL
checkpoints = glob('/home/mike/devel/experiments/train-calamari-gt4histocr/models/*.ckpt.json') # XXX
checkpoints = glob(self.parameter['checkpoint'])
self.predictor = MultiPredictor(checkpoints=checkpoints)
voter_params = VoterParams()