diff --git a/deploy/hubserving/ocr_det/module.py b/deploy/hubserving/ocr_det/module.py index 5f7bd6c473884b80fbe4d24088808444633f100d..965062757627a323b2f7df6b565da94f6c3725e4 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 41a42104a81b736eeca346737d2dcefe3d728ef8..c25cebc3fdbc95ce928f66050ad1681d6a5a5624 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 7f3617330bc87ac77a150af9e40dc125d3bfd7de..95ea73d7e9b6fc0e55c7f2203e820479863f7dea 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