From 7884ab93c614daa06bc43a6d6cc6cae13c1e7aee Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 18 Oct 2019 10:59:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20sbb=5Ftextline=5Fdetector:=20Des?= =?UTF-8?q?troy=20Keras=20session=20at=20the=20end=20of=20a=20run()=20to?= =?UTF-8?q?=20free=20up=20memory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/sbb_textline_detector/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qurator/sbb_textline_detector/main.py b/qurator/sbb_textline_detector/main.py index f489595..9c348de 100644 --- a/qurator/sbb_textline_detector/main.py +++ b/qurator/sbb_textline_detector/main.py @@ -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))