diff --git a/ocrd_calamari/ocr.py b/ocrd_calamari/ocr.py index 4a782e0..1aba218 100644 --- a/ocrd_calamari/ocr.py +++ b/ocrd_calamari/ocr.py @@ -33,7 +33,7 @@ class CalamariOcr(Processor): self.predictor = MultiPredictor(checkpoints=checkpoints) voter_params = VoterParams() - voter_params.type = VoterParams.Type.Value('confidence_voter_default_ctc'.upper()) + voter_params.type = VoterParams.Type.Value(self.parameter['voter'].upper()) self.voter = voter_from_proto(voter_params) def resolve_image_as_np(self, image_url, coords): diff --git a/ocrd_calamari/ocrd-tool.json b/ocrd_calamari/ocrd-tool.json index a2a8c4f..ca03964 100644 --- a/ocrd_calamari/ocrd-tool.json +++ b/ocrd_calamari/ocrd-tool.json @@ -21,7 +21,7 @@ "XXX checkpoint": {"type": "string", "format": "file", "cacheable": true}, "processes": {"type": "number", "default": 1}, "batch_size": {"type": "number", "default": 1}, - "XXX voter": {"type": "string", "default": "confidence_voter_default_ctc"}, + "voter": {"type": "string", "default": "confidence_voter_default_ctc"}, "XXXX extended_prediction_data_format": {"type": "string", "default": "json"}, "XXX output_dir": "TODO", "XXX extended_prediction_data": "TODO"