diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index 55870a5016e7fbf2db3cef267f28a06fca25d378..26ac4d818634f83ebbc160d593b73a5684776170 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -255,7 +255,7 @@ class SRNLabelEncode(BaseRecLabelEncode): def __call__(self, data): text = data['label'] text = self.encode(text) - char_num = len(self.character) + char_num = len(self.character_str) if text is None: return None if len(text) > self.max_text_len: