From f699d787ff0e2ce8cb007bb65eb8f7660129974c Mon Sep 17 00:00:00 2001 From: Xie Xuyang Date: Thu, 29 Sep 2022 11:19:44 +0800 Subject: [PATCH] fix #7534 (#7535) --- paddleocr.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paddleocr.py b/paddleocr.py index fa732fc1..d34b8f78 100644 --- a/paddleocr.py +++ b/paddleocr.py @@ -480,10 +480,11 @@ class PaddleOCR(predict_system.TextSystem): params.rec_image_shape = "3, 48, 320" else: params.rec_image_shape = "3, 32, 320" - # download model - maybe_download(params.det_model_dir, det_url) - maybe_download(params.rec_model_dir, rec_url) - maybe_download(params.cls_model_dir, cls_url) + # download model if using paddle infer + if not params.use_onnx: + maybe_download(params.det_model_dir, det_url) + maybe_download(params.rec_model_dir, rec_url) + maybe_download(params.cls_model_dir, cls_url) if params.det_algorithm not in SUPPORT_DET_MODEL: logger.error('det_algorithm must in {}'.format(SUPPORT_DET_MODEL)) -- GitLab