From 160bb06e7075430da0bc7742ffe1cf7c4f4b496b Mon Sep 17 00:00:00 2001 From: MissPenguin Date: Tue, 23 Jun 2020 11:46:45 +0800 Subject: [PATCH] add config.enable_memory_optim() --- tools/infer/utility.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index ba5a3f38..b3d15f01 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -88,6 +88,7 @@ def create_predictor(args, mode): if args.use_gpu: config.enable_use_gpu(args.gpu_mem, 0) + config.enable_memory_optim() else: config.disable_gpu() @@ -310,4 +311,4 @@ if __name__ == '__main__': new_img = draw_ocr(image, boxes, txts, scores, draw_txt=True) - cv2.imwrite(img_name, new_img) \ No newline at end of file + cv2.imwrite(img_name, new_img) -- GitLab