We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a3afc16 + 1599a45 commit 1b1f170Copy full SHA for 1b1f170
ppocr/data/imaug/label_ops.py
@@ -215,7 +215,7 @@ def __call__(self, data):
215
return None
216
data['length'] = np.array(len(text))
217
text = [0] + text + [len(self.character) - 1] + [0] * (self.max_text_len
218
- - len(text) - 1)
+ - len(text) - 2)
219
data['label'] = np.array(text)
220
return data
221
@@ -261,7 +261,7 @@ def __call__(self, data):
261
if len(text) > self.max_text_len:
262
263
264
- text = text + [char_num] * (self.max_text_len - len(text))
+ text = text + [char_num - 1] * (self.max_text_len - len(text))
265
266
267
0 commit comments