From 5d440857e7b3ac270496396920d134232f9cda66 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 18 Oct 2019 10:59:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20sbb=5Ftextline=5Fdetector:=20Del?= =?UTF-8?q?ete=20textline=20session/model=20after=20using=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qurator/sbb_textline_detector/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qurator/sbb_textline_detector/main.py b/qurator/sbb_textline_detector/main.py index 9c1ba35..f489595 100644 --- a/qurator/sbb_textline_detector/main.py +++ b/qurator/sbb_textline_detector/main.py @@ -683,6 +683,12 @@ class textlineerkenner: y_predi = mask_true y_predi = cv2.resize(y_predi, (img_org.shape[1], img_org.shape[0]), interpolation=cv2.INTER_NEAREST) + + session_textline.close() + + del model_textline + del session_textline + gc.collect() return y_predi def get_textlines_for_each_textregions(self, textline_mask_tot, boxes):