From fff74aa24ca1b43e0d2a5db3e65c90f45dd81fdc Mon Sep 17 00:00:00 2001 From: Jethong <1147925384@qq.com> Date: Mon, 12 Apr 2021 18:54:42 +0800 Subject: [PATCH] fix release2.1 infer postprocess --- tools/infer/predict_e2e.py | 1 + tools/infer/utility.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/infer/predict_e2e.py b/tools/infer/predict_e2e.py index a5c57914..8b94f24a 100755 --- a/tools/infer/predict_e2e.py +++ b/tools/infer/predict_e2e.py @@ -66,6 +66,7 @@ class TextE2E(object): postprocess_params["score_thresh"] = args.e2e_pgnet_score_thresh postprocess_params["character_dict_path"] = args.e2e_char_dict_path postprocess_params["valid_set"] = args.e2e_pgnet_valid_set + postprocess_params["mode"] = args.e2e_pgnet_mode self.e2e_pgnet_polygon = args.e2e_pgnet_polygon else: logger.info("unknown e2e_algorithm:{}".format(self.e2e_algorithm)) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index b273eaf3..9fa51d80 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -86,6 +86,7 @@ def parse_args(): "--e2e_char_dict_path", type=str, default="./ppocr/utils/ic15_dict.txt") parser.add_argument("--e2e_pgnet_valid_set", type=str, default='totaltext') parser.add_argument("--e2e_pgnet_polygon", type=bool, default=True) + parser.add_argument("--e2e_pgnet_mode", type=str, default='fast') # params for text classifier parser.add_argument("--use_angle_cls", type=str2bool, default=False) -- GitLab