Merge pull request #2335 from Shreeshrii/master

Changes to tesstrain.py - max_workers=8, distort_image=false
This commit is contained in:
zdenop 2019-03-17 15:27:34 +01:00 committed by GitHub
commit ac7ea4322a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ class TrainingArgs(argparse.Namespace):
self.linedata = False
self.run_shape_clustering = False
self.extract_font_properties = True
self.distort_image = False
def err_exit(msg):
log.critical(msg)
@ -174,7 +174,7 @@ parser.add_argument(
)
parser.add_argument(
"--distort_image", dest="distort_image", help="--distort_image=true."
"--distort_image", dest="distort_image", help="set --distort_image=true."
)
tessdata_group = parser.add_argument_group(
@ -380,7 +380,7 @@ def phase_I_generate_image(ctx, par_factor):
with tqdm(
total=len(ctx.fonts)
) as pbar, concurrent.futures.ThreadPoolExecutor() as executor:
) as pbar, concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
futures = [
executor.submit(generate_font_image, ctx, font, exposure, char_spacing)
for font in ctx.fonts