mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/ocr.git
synced 2025-02-28 16:34:49 +00:00
Use a single core for deu_frak
This commit is contained in:
parent
d84db585fa
commit
fdc53fd16c
5
ocr
5
ocr
@ -172,9 +172,10 @@ class OCRWorkflow(WorkflowRunner):
|
|||||||
'''
|
'''
|
||||||
' Tesseract runs fastest with four cores. So we run it with either four
|
' Tesseract runs fastest with four cores. So we run it with either four
|
||||||
' or, if there are less then four cores available for this workflow, the
|
' or, if there are less then four cores available for this workflow, the
|
||||||
' available core number.
|
' available core number. The deu_frak language model only supports
|
||||||
|
' single core processing, so we use use only one core for this language.
|
||||||
'''
|
'''
|
||||||
ocr_job_nCores = min(4, self.nCores)
|
ocr_job_nCores = 1 if self.lang == "deu_frak" else min(4, self.nCores)
|
||||||
for job in self.jobs:
|
for job in self.jobs:
|
||||||
for file in filter(lambda x: x.endswith(".tif") if self.skipBinarization else x.endswith(".bin.png"), os.listdir(os.path.join(job["output_dir"], "tmp"))):
|
for file in filter(lambda x: x.endswith(".tif") if self.skipBinarization else x.endswith(".bin.png"), os.listdir(os.path.join(job["output_dir"], "tmp"))):
|
||||||
ocr_job_number += 1
|
ocr_job_number += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user