🚧 Do not hardcode used models

fix/readme-no-checkpoint
Gerber, Mike 5 years ago
parent 8cfb075a6d
commit ebf0d53640

@ -9,3 +9,17 @@ This offers a OCR-D compliant workspace processor for some of the functionality
This processor only operates on the text line level and so needs a line segmentation (and by extension a binarized
image) as its input.
Example Usage
-------------
~~~
ocrd-calamari-recognize -p test-parameters.json -m mets.xml -I OCR-D-SEG-LINE -O OCR-D-OCR-CALAMARI
~~~
With `test-parameters.json`:
~~~
{
"checkpoint": "/path/to/some/trained/models/*.ckpt.json"
}
~~~

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

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

Loading…
Cancel
Save