未验证 提交 4f7b28e8 编写于 作者: T topduke 提交者: GitHub

Update rec_postprocess.py

上级 6cded42b
...@@ -24,7 +24,7 @@ class BaseRecLabelDecode(object): ...@@ -24,7 +24,7 @@ class BaseRecLabelDecode(object):
def __init__(self, character_dict_path=None, use_space_char=False): def __init__(self, character_dict_path=None, use_space_char=False):
self.beg_str = "sos" self.beg_str = "sos"
self.end_str = "eos" self.end_str = "eos"
self.reverse = False
self.character_str = [] self.character_str = []
if character_dict_path is None: if character_dict_path is None:
self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz" self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz"
...@@ -40,8 +40,6 @@ class BaseRecLabelDecode(object): ...@@ -40,8 +40,6 @@ class BaseRecLabelDecode(object):
dict_character = list(self.character_str) dict_character = list(self.character_str)
if 'arabic' in character_dict_path: if 'arabic' in character_dict_path:
self.reverse = True self.reverse = True
else:
self.reverse = False
dict_character = self.add_special_char(dict_character) dict_character = self.add_special_char(dict_character)
self.dict = {} self.dict = {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册