From 27d71163b73192dc157f531775c3614dd274306c Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Sun, 25 Apr 2021 14:23:49 +0800 Subject: [PATCH] fix hubserving --- deploy/hubserving/ocr_det/module.py | 1 + deploy/hubserving/ocr_rec/module.py | 2 +- deploy/hubserving/ocr_system/module.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/hubserving/ocr_det/module.py b/deploy/hubserving/ocr_det/module.py index 5f7bd6c4..96506275 100644 --- a/deploy/hubserving/ocr_det/module.py +++ b/deploy/hubserving/ocr_det/module.py @@ -15,6 +15,7 @@ import paddlehub as hub from tools.infer.utility import base64_to_cv2 from tools.infer.predict_det import TextDetector +from deploy.hubserving.ocr_det.params import read_params @moduleinfo( diff --git a/deploy/hubserving/ocr_rec/module.py b/deploy/hubserving/ocr_rec/module.py index 41a42104..c25cebc3 100644 --- a/deploy/hubserving/ocr_rec/module.py +++ b/deploy/hubserving/ocr_rec/module.py @@ -14,6 +14,7 @@ import paddlehub as hub from tools.infer.utility import base64_to_cv2 from tools.infer.predict_rec import TextRecognizer +from deploy.hubserving.ocr_rec.params import read_params @moduleinfo( @@ -28,7 +29,6 @@ class OCRRec(hub.Module): """ initialize with the necessary elements """ - from ocr_rec.params import read_params cfg = read_params() cfg.use_gpu = use_gpu diff --git a/deploy/hubserving/ocr_system/module.py b/deploy/hubserving/ocr_system/module.py index 7f361733..95ea73d7 100644 --- a/deploy/hubserving/ocr_system/module.py +++ b/deploy/hubserving/ocr_system/module.py @@ -17,6 +17,7 @@ import paddlehub as hub from tools.infer.utility import base64_to_cv2 from tools.infer.predict_system import TextSystem +from deploy.hubserving.ocr_system.params import read_params @moduleinfo( @@ -31,7 +32,6 @@ class OCRSystem(hub.Module): """ initialize with the necessary elements """ - from ocr_system.params import read_params cfg = read_params() cfg.use_gpu = use_gpu -- GitLab