mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-07-01 15:09: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": {
|
"textline_light": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"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": {
|
"tables": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
@ -65,11 +65,6 @@
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "if this parameter set to true, this tool would check that input image need resizing and enhancement or not."
|
"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": {
|
"right_to_left": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
|
|
@ -14,9 +14,10 @@ class EynollahProcessor(Processor):
|
||||||
return 'ocrd-eynollah-segment'
|
return 'ocrd-eynollah-segment'
|
||||||
|
|
||||||
def setup(self) -> None:
|
def setup(self) -> None:
|
||||||
if self.parameter['textline_light'] and not self.parameter['light_version']:
|
assert self.parameter
|
||||||
raise ValueError("Error: You set parameter 'textline_light' to enable light textline detection, "
|
if self.parameter['textline_light'] != self.parameter['light_version']:
|
||||||
"but parameter 'light_version' is not enabled")
|
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.eynollah = Eynollah(
|
||||||
self.resolve_resource(self.parameter['models']),
|
self.resolve_resource(self.parameter['models']),
|
||||||
logger=self.logger,
|
logger=self.logger,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue