diff --git a/deploy/pdserving/det_local_server.py b/deploy/pdserving/det_local_server.py index 2f7ee249502825e10358b7019e63fc45ce48d996..8659dd5b295b3889c803ef96510dd2c6a250033f 100644 --- a/deploy/pdserving/det_local_server.py +++ b/deploy/pdserving/det_local_server.py @@ -41,7 +41,7 @@ class TextDetectorHelper(TextDetector): elif self.det_algorithm == "EAST": self.fetch = ["sigmoid_0.tmp_0", "tmp_2"] elif self.det_algorithm == "DB": - self.fetch = ["sigmoid_0.tmp_0"] + self.fetch = ["save_infer_model/scale_0.tmp_0"] def preprocess(self, img): img = img.copy() diff --git a/deploy/pdserving/det_rpc_server.py b/deploy/pdserving/det_rpc_server.py index 0d311cd974a48eb8cd03cda76da75ae3bf8ca0f8..3bc0579dcebedfd8d7e267fed2b6aa4d9fe03843 100644 --- a/deploy/pdserving/det_rpc_server.py +++ b/deploy/pdserving/det_rpc_server.py @@ -41,7 +41,7 @@ class TextDetectorHelper(TextDetector): elif self.det_algorithm == "EAST": self.fetch = ["sigmoid_0.tmp_0", "tmp_2"] elif self.det_algorithm == "DB": - self.fetch = ["sigmoid_0.tmp_0"] + self.fetch = ["save_infer_model/scale_0.tmp_0"] def preprocess(self, img): im, ratio_list = self.preprocess_op(img) diff --git a/deploy/pdserving/params.py b/deploy/pdserving/params.py index 6d0ecf988ff76db5784866639c8594428e326049..9d0b082fb983776053619353ca8736e8c3dc8d79 100644 --- a/deploy/pdserving/params.py +++ b/deploy/pdserving/params.py @@ -14,7 +14,7 @@ def read_params(): #params for text detector cfg.det_algorithm = "DB" - cfg.det_model_dir = "./det_mv_server/" + cfg.det_model_dir = "./det_infer_server/" cfg.det_max_side_len = 960 #DB parmas @@ -29,7 +29,7 @@ def read_params(): #params for text recognizer cfg.rec_algorithm = "CRNN" - cfg.rec_model_dir = "./ocr_rec_server/" + cfg.rec_model_dir = "./rec_infer_server/" cfg.rec_image_shape = "3, 32, 320" cfg.rec_char_type = 'ch' @@ -41,7 +41,7 @@ def read_params(): #params for text classifier cfg.use_angle_cls = True - cfg.cls_model_dir = "./ocr_clas_server/" + cfg.cls_model_dir = "./cls_infer_server/" cfg.cls_image_shape = "3, 48, 192" cfg.label_list = ['0', '180'] cfg.cls_batch_num = 30 diff --git a/deploy/pdserving/rec_local_server.py b/deploy/pdserving/rec_local_server.py index b3ec74103bcbd37cfd4e8243c07731380597b3d5..40266e3112d464f8161ad0dc94dfb192b317f62c 100644 --- a/deploy/pdserving/rec_local_server.py +++ b/deploy/pdserving/rec_local_server.py @@ -36,7 +36,7 @@ class TextRecognizerHelper(TextRecognizer): def __init__(self, args): super(TextRecognizerHelper, self).__init__(args) if self.loss_type == "ctc": - self.fetch = ["ctc_greedy_decoder_0.tmp_0", "softmax_0.tmp_0"] + self.fetch = ["save_infer_model/scale_0.tmp_0", "save_infer_model/scale_1.tmp_0"] def preprocess(self, img_list): img_num = len(img_list) @@ -83,8 +83,8 @@ class TextRecognizerHelper(TextRecognizer): if self.loss_type == "ctc": rec_idx_batch = outputs[0] predict_batch = outputs[1] - rec_idx_lod = args["ctc_greedy_decoder_0.tmp_0.lod"] - predict_lod = args["softmax_0.tmp_0.lod"] + rec_idx_lod = args["save_infer_model/scale_0.tmp_0.lod"] + predict_lod = args["save_infer_model/scale_1.tmp_0.lod"] indices = args["indices"] rec_res = [['', 0.0]] * (len(rec_idx_lod) - 1) for rno in range(len(rec_idx_lod) - 1): diff --git a/deploy/pdserving/rec_rpc_server.py b/deploy/pdserving/rec_rpc_server.py index 59282373a6733446293c6ac85192a77653faff67..cb43eb990ffec679aabd5ab1408572529c3a2737 100644 --- a/deploy/pdserving/rec_rpc_server.py +++ b/deploy/pdserving/rec_rpc_server.py @@ -35,7 +35,7 @@ class TextRecognizerHelper(TextRecognizer): def __init__(self, args): super(TextRecognizerHelper, self).__init__(args) if self.loss_type == "ctc": - self.fetch = ["ctc_greedy_decoder_0.tmp_0", "softmax_0.tmp_0"] + self.fetch = ["save_infer_model/scale_0.tmp_0", "save_infer_model/scale_1.tmp_0"] def preprocess(self, img_list): img_num = len(img_list) @@ -88,8 +88,8 @@ class TextRecognizerHelper(TextRecognizer): if self.loss_type == "ctc": rec_idx_batch = outputs[0] predict_batch = outputs[1] - rec_idx_lod = args["ctc_greedy_decoder_0.tmp_0.lod"] - predict_lod = args["softmax_0.tmp_0.lod"] + rec_idx_lod = args["save_infer_model/scale_0.tmp_0.lod"] + predict_lod = args["save_infer_model/scale_1.tmp_0.lod"] indices = args["indices"] rec_res = [['', 0.0]] * (len(rec_idx_lod) - 1) for rno in range(len(rec_idx_lod) - 1):