From 4b845ca159bbe720ca31862b808244f56f6e8e5c Mon Sep 17 00:00:00 2001 From: tink2123 Date: Mon, 8 Feb 2021 03:30:27 +0000 Subject: [PATCH] fix attn encode --- ppocr/data/imaug/label_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index 55870a50..fd6ba646 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -215,7 +215,7 @@ class AttnLabelEncode(BaseRecLabelEncode): return None data['length'] = np.array(len(text)) text = [0] + text + [len(self.character) - 1] + [0] * (self.max_text_len - - len(text) - 1) + - len(text) - 2) data['label'] = np.array(text) return data -- GitLab