mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-09 19:59:53 +02:00
🚧 Use voter from JSON config
This commit is contained in:
parent
67aa3db357
commit
64794363d8
2 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue