未验证 提交 438060d3 编写于 作者: D Double_V 提交者: GitHub

Fix hub 21 (#2626)

* fix hubserving

* fix hubserving
上级 73c7c6ac
...@@ -17,6 +17,8 @@ import paddlehub as hub ...@@ -17,6 +17,8 @@ import paddlehub as hub
from tools.infer.utility import base64_to_cv2 from tools.infer.utility import base64_to_cv2
from tools.infer.predict_det import TextDetector from tools.infer.predict_det import TextDetector
from deploy.hubserving.ocr_det.params import read_params
from tools.infer.utility import parse_args from tools.infer.utility import parse_args
...@@ -32,6 +34,7 @@ class OCRDet(hub.Module): ...@@ -32,6 +34,7 @@ class OCRDet(hub.Module):
""" """
initialize with the necessary elements initialize with the necessary elements
""" """
cfg = self.merge_configs() cfg = self.merge_configs()
cfg.use_gpu = use_gpu cfg.use_gpu = use_gpu
...@@ -57,7 +60,6 @@ class OCRDet(hub.Module): ...@@ -57,7 +60,6 @@ class OCRDet(hub.Module):
sys.argv = sys.argv[:1] sys.argv = sys.argv[:1]
cfg = parse_args() cfg = parse_args()
from ocr_det.params import read_params
update_cfg_map = vars(read_params()) update_cfg_map = vars(read_params())
for key in update_cfg_map: for key in update_cfg_map:
......
...@@ -15,6 +15,8 @@ import paddlehub as hub ...@@ -15,6 +15,8 @@ import paddlehub as hub
from tools.infer.utility import base64_to_cv2 from tools.infer.utility import base64_to_cv2
from tools.infer.predict_rec import TextRecognizer from tools.infer.predict_rec import TextRecognizer
from deploy.hubserving.ocr_rec.params import read_params
from tools.infer.utility import parse_args from tools.infer.utility import parse_args
...@@ -30,6 +32,7 @@ class OCRRec(hub.Module): ...@@ -30,6 +32,7 @@ class OCRRec(hub.Module):
""" """
initialize with the necessary elements initialize with the necessary elements
""" """
cfg = self.merge_configs() cfg = self.merge_configs()
cfg.use_gpu = use_gpu cfg.use_gpu = use_gpu
...@@ -55,7 +58,6 @@ class OCRRec(hub.Module): ...@@ -55,7 +58,6 @@ class OCRRec(hub.Module):
sys.argv = sys.argv[:1] sys.argv = sys.argv[:1]
cfg = parse_args() cfg = parse_args()
from ocr_det.params import read_params
update_cfg_map = vars(read_params()) update_cfg_map = vars(read_params())
for key in update_cfg_map: for key in update_cfg_map:
......
...@@ -18,6 +18,7 @@ import paddlehub as hub ...@@ -18,6 +18,7 @@ import paddlehub as hub
from tools.infer.utility import base64_to_cv2 from tools.infer.utility import base64_to_cv2
from tools.infer.predict_system import TextSystem from tools.infer.predict_system import TextSystem
from deploy.hubserving.ocr_system.params import read_params
from tools.infer.utility import parse_args from tools.infer.utility import parse_args
...@@ -58,7 +59,6 @@ class OCRSystem(hub.Module): ...@@ -58,7 +59,6 @@ class OCRSystem(hub.Module):
sys.argv = sys.argv[:1] sys.argv = sys.argv[:1]
cfg = parse_args() cfg = parse_args()
from ocr_det.params import read_params
update_cfg_map = vars(read_params()) update_cfg_map = vars(read_params())
for key in update_cfg_map: for key in update_cfg_map:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册