🧹 sbb_textline_detector: Destroy Keras session at the end of a run() to free up memory

pull/1/head
Gerber, Mike 5 years ago
parent 5d440857e7
commit 7884ab93c6

@ -1607,6 +1607,9 @@ class textlineerkenner:
self.deskew_textline_patches(contours, boxes) self.deskew_textline_patches(contours, boxes)
self.write_into_page_xml(contours,page_coord,self.dir_out , order_of_texts , id_of_texts) 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.command()
@click.option('--image', '-i', help='image filename', type=click.Path(exists=True, dir_okay=False)) @click.option('--image', '-i', help='image filename', type=click.Path(exists=True, dir_okay=False))

Loading…
Cancel
Save