Skip to content

Commit

Permalink
Merge pull request #591 from stweil/extract_lines
Browse files Browse the repository at this point in the history
Print separate lines for pages in log output of extract_lines.py
  • Loading branch information
mittagessen authored Apr 20, 2024
2 parents 621305a + 19ab093 commit 1486bbd
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 1486bbd

Please sign in to comment.