mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-09 20:29:55 +02:00
ocrd-tool: add "allow_enhancement" parameter
This commit is contained in:
parent
4a13781ef4
commit
9ce02a569e
2 changed files with 21 additions and 16 deletions
|
@ -29,11 +29,11 @@
|
|||
"default": true,
|
||||
"description": "Try to detect all element subtypes, including drop-caps and headings"
|
||||
},
|
||||
"tables": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Try to detect table regions"
|
||||
},
|
||||
"tables": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Try to detect table regions"
|
||||
},
|
||||
"curved_line": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -44,6 +44,11 @@
|
|||
"default": false,
|
||||
"description": "check the resolution against the number of detected columns and if needed, scale the image up or down during layout detection (heuristic to improve quality and performance)"
|
||||
},
|
||||
"allow_enhancement": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "if this parameter set to true, this tool would check that input image need resizing and enhancement or not."
|
||||
},
|
||||
"headers_off": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -51,14 +56,14 @@
|
|||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"description": "models for eynollah (TensorFlow format)",
|
||||
"url": "https://github.com/qurator-spk/eynollah/releases/download/v0.3.0/models_eynollah.tar.gz",
|
||||
"name": "default",
|
||||
"size": 1761991295,
|
||||
"type": "archive",
|
||||
"path_in_archive": "models_eynollah"
|
||||
}
|
||||
{
|
||||
"description": "models for eynollah (TensorFlow format)",
|
||||
"url": "https://github.com/qurator-spk/eynollah/releases/download/v0.3.0/models_eynollah.tar.gz",
|
||||
"name": "default",
|
||||
"size": 1761991295,
|
||||
"type": "archive",
|
||||
"path_in_archive": "models_eynollah"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,15 +20,15 @@ class EynollahProcessor(Processor):
|
|||
# page_image, _, _ = self.workspace.image_from_page(page, page_id, feature_filter='binarized')
|
||||
image_filename = self.workspace.download_file(next(self.workspace.mets.find_files(local_filename=page.imageFilename))).local_filename
|
||||
Eynollah(
|
||||
dir_models=self.resolve_resource(self.parameter['models']),
|
||||
allow_enhancement=False,
|
||||
self.resolve_resource(self.parameter['models']),
|
||||
self.logger,
|
||||
allow_enhancement=self.parameter['allow_enhancement'],
|
||||
curved_line=self.parameter['curved_line'],
|
||||
full_layout=self.parameter['full_layout'],
|
||||
allow_scaling=self.parameter['allow_scaling'],
|
||||
headers_off=self.parameter['headers_off'],
|
||||
tables=self.parameter['tables'],
|
||||
override_dpi=self.parameter['dpi'],
|
||||
logger=self.logger,
|
||||
pcgts=pcgts,
|
||||
image_filename=image_filename
|
||||
).run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue