From 19ab0931a97fe9c2ff71e5dc936c6a3e4429ee70 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 19 Apr 2024 17:29:38 +0200 Subject: [PATCH] Print separate lines for pages in log output of extract_lines.py Signed-off-by: Stefan Weil --- kraken/contrib/extract_lines.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kraken/contrib/extract_lines.py b/kraken/contrib/extract_lines.py index 78f779af9..053d48f97 100755 --- a/kraken/contrib/extract_lines.py +++ b/kraken/contrib/extract_lines.py @@ -56,6 +56,7 @@ def cli(format_type, model, legacy_polygons, files): im.save('{}.{}.jpg'.format(splitext(doc)[0], idx)) with open('{}.{}.gt.txt'.format(splitext(doc)[0], idx), 'w') as fp: fp.write(sample['text']) + click.echo() else: net = vgsl.TorchVGSLModel.load_model(model) for doc in files: @@ -65,6 +66,7 @@ def cli(format_type, model, legacy_polygons, files): for idx, (im, box) in enumerate(segmentation.extract_polygons(full_im, bounds, legacy=legacy_polygons)): click.echo('.', nl=False) im.save('{}.{}.jpg'.format(splitext(doc)[0], idx)) + click.echo() if __name__ == '__main__':