mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-07-01 06:59:54 +02:00
Merge b7b218ff11
into 3dcbb20cac
This commit is contained in:
commit
5df79e8cc5
2 changed files with 5 additions and 9 deletions
|
@ -38,7 +38,7 @@
|
|||
"textline_light": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Light version need textline light"
|
||||
"description": "Light version need textline light. If this parameter set to true, this tool will try to return contoure of textlines instead of rectangle bounding box of textline with a faster method."
|
||||
},
|
||||
"tables": {
|
||||
"type": "boolean",
|
||||
|
@ -65,11 +65,6 @@
|
|||
"default": false,
|
||||
"description": "if this parameter set to true, this tool would check that input image need resizing and enhancement or not."
|
||||
},
|
||||
"textline_light": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "if this parameter set to true, this tool will try to return contoure of textlines instead of rectangle bounding box of textline with a faster method."
|
||||
},
|
||||
"right_to_left": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
|
|
@ -14,9 +14,10 @@ class EynollahProcessor(Processor):
|
|||
return 'ocrd-eynollah-segment'
|
||||
|
||||
def setup(self) -> None:
|
||||
if self.parameter['textline_light'] and not self.parameter['light_version']:
|
||||
raise ValueError("Error: You set parameter 'textline_light' to enable light textline detection, "
|
||||
"but parameter 'light_version' is not enabled")
|
||||
assert self.parameter
|
||||
if self.parameter['textline_light'] != self.parameter['light_version']:
|
||||
raise ValueError("Error: You must set or unset both parameter 'textline_light' (to enable light textline detection), "
|
||||
"and parameter 'light_version' (faster+simpler method for main region detection and deskewing)")
|
||||
self.eynollah = Eynollah(
|
||||
self.resolve_resource(self.parameter['models']),
|
||||
logger=self.logger,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue