mirror of
https://github.com/qurator-spk/sbb_textline_detection.git
synced 2025-06-09 03:40:18 +02:00
🧹 sbb_textline_detector: Destroy Keras session at the end of a run() to free up memory
This commit is contained in:
parent
5d440857e7
commit
7884ab93c6
1 changed files with 3 additions and 0 deletions
|
@ -1607,6 +1607,9 @@ class textlineerkenner:
|
|||
self.deskew_textline_patches(contours, boxes)
|
||||
self.write_into_page_xml(contours,page_coord,self.dir_out , order_of_texts , id_of_texts)
|
||||
|
||||
# Destroy the current Keras session/graph to free memory
|
||||
K.clear_session()
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option('--image', '-i', help='image filename', type=click.Path(exists=True, dir_okay=False))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue