Skip to content

Commit

Permalink
Print separate lines for pages in log output of extract_lines.py
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Apr 19, 2024
1 parent 621305a commit 19ab093
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kraken/contrib/extract_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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__':
Expand Down

0 comments on commit 19ab093

Please sign in to comment.