From dc3bce76916b515870655a1e9150a91f01ac7649 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Thu, 2 Sep 2021 07:28:30 +0000 Subject: [PATCH] update sar postprocess --- configs/rec/rec_r31_sar.yml | 2 +- ppocr/postprocess/rec_postprocess.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/rec/rec_r31_sar.yml b/configs/rec/rec_r31_sar.yml index 73d56f37..7adb7136 100644 --- a/configs/rec/rec_r31_sar.yml +++ b/configs/rec/rec_r31_sar.yml @@ -19,6 +19,7 @@ Global: max_text_length: 30 infer_mode: False use_space_char: False + rm_symbol: True save_res_path: ./output/rec/predicts_sar.txt Optimizer: @@ -47,7 +48,6 @@ Loss: PostProcess: name: SARLabelDecode - rm_symbol: True Metric: name: RecMetric diff --git a/ppocr/postprocess/rec_postprocess.py b/ppocr/postprocess/rec_postprocess.py index 20439281..f2c3f289 100644 --- a/ppocr/postprocess/rec_postprocess.py +++ b/ppocr/postprocess/rec_postprocess.py @@ -526,10 +526,10 @@ class SARLabelDecode(BaseRecLabelDecode): character_dict_path=None, character_type='ch', use_space_char=False, - rm_symbol=True, **kwargs): super(SARLabelDecode, self).__init__(character_dict_path, character_type, use_space_char) + self.rm_symbol = kwargs.get('rm_symbol', True) def add_special_char(self, dict_character): beg_end_str = "" -- GitLab