diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index 55870a5016e7fbf2db3cef267f28a06fca25d378..6d401277d67dfdf180d74d3427244c3a938f5eb2 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -261,7 +261,7 @@ class SRNLabelEncode(BaseRecLabelEncode): if len(text) > self.max_text_len: return None data['length'] = np.array(len(text)) - text = text + [char_num] * (self.max_text_len - len(text)) + text = text + [char_num - 1] * (self.max_text_len - len(text)) data['label'] = np.array(text) return data