mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-15 15:19:55 +02:00
OCR-D: fix typo light_mode→light_version
This commit is contained in:
parent
4338259ca1
commit
c794d4d29f
3 changed files with 9 additions and 51 deletions
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"version": "0.1.0",
|
|
||||||
"git_url": "https://github.com/qurator-spk/sbb_binarization",
|
|
||||||
"tools": {
|
|
||||||
"ocrd-sbb-binarize": {
|
|
||||||
"executable": "ocrd-sbb-binarize",
|
|
||||||
"description": "Pixelwise binarization with selectional auto-encoders in Keras",
|
|
||||||
"categories": ["Image preprocessing"],
|
|
||||||
"steps": ["preprocessing/optimization/binarization"],
|
|
||||||
"input_file_grp": [],
|
|
||||||
"output_file_grp": [],
|
|
||||||
"parameters": {
|
|
||||||
"operation_level": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["page", "region"],
|
|
||||||
"default": "page",
|
|
||||||
"description": "PAGE XML hierarchy level to operate on"
|
|
||||||
},
|
|
||||||
"model": {
|
|
||||||
"description": "Directory containing HDF5 or SavedModel/ProtoBuf models. Can be an absolute path or a path relative to the OCR-D resource location, the current working directory or the $SBB_BINARIZE_DATA environment variable (if set)",
|
|
||||||
"type": "string",
|
|
||||||
"format": "uri",
|
|
||||||
"content-type": "text/directory",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"url": "https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2020_01_16.zip",
|
|
||||||
"name": "default",
|
|
||||||
"type": "archive",
|
|
||||||
"path_in_archive": "saved_model_2020_01_16",
|
|
||||||
"size": 563147331,
|
|
||||||
"description": "default models provided by github.com/qurator-spk (SavedModel format)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip",
|
|
||||||
"name": "default-2021-03-09",
|
|
||||||
"type": "archive",
|
|
||||||
"path_in_archive": ".",
|
|
||||||
"size": 133230419,
|
|
||||||
"description": "updated default models provided by github.com/qurator-spk (SavedModel format)"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -13,10 +13,10 @@
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"models": {
|
"models": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "file",
|
"format": "uri",
|
||||||
"content-type": "text/directory",
|
"content-type": "text/directory",
|
||||||
"cacheable": true,
|
"cacheable": true,
|
||||||
"description": "Path to directory containing models to be used (See https://qurator-data.de/eynollah)",
|
"description": "Directory containing models to be used (See https://qurator-data.de/eynollah)",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"dpi": {
|
"dpi": {
|
||||||
|
|
|
@ -9,11 +9,16 @@ class EynollahProcessor(Processor):
|
||||||
# already employs GPU (without singleton process atm)
|
# already employs GPU (without singleton process atm)
|
||||||
max_workers = 1
|
max_workers = 1
|
||||||
|
|
||||||
|
@property
|
||||||
|
def executable(self):
|
||||||
|
return 'ocrd-eynollah-segment'
|
||||||
|
|
||||||
def setup(self) -> None:
|
def setup(self) -> None:
|
||||||
# for caching models
|
# for caching models
|
||||||
self.models = None
|
self.models = None
|
||||||
if self.parameter['textline_light'] and not self.parameter['light_mode']:
|
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_mode' is not enabled")
|
raise ValueError("Error: You set parameter 'textline_light' to enable light textline detection, "
|
||||||
|
"but parameter 'light_version' is not enabled")
|
||||||
|
|
||||||
def process_page_pcgts(self, *input_pcgts: Optional[OcrdPage], page_id: Optional[str] = None) -> OcrdPageResult:
|
def process_page_pcgts(self, *input_pcgts: Optional[OcrdPage], page_id: Optional[str] = None) -> OcrdPageResult:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue