diff --git a/ppocr/data/imaug/label_ops.py b/ppocr/data/imaug/label_ops.py index c20eef2c8c4481d46fae3f9006946b7a1b5c6bda..c6c8a520a09c9613bda7133ba44d443fb1f40df2 100644 --- a/ppocr/data/imaug/label_ops.py +++ b/ppocr/data/imaug/label_ops.py @@ -918,7 +918,10 @@ class VQATokenLabelEncode(object): text = info["text"] encode_res = self.tokenizer.encode( - text, pad_to_max_seq_len=False, return_attention_mask=True) + text, + pad_to_max_seq_len=False, + return_attention_mask=True, + return_token_type_ids=True) if not self.add_special_ids: # TODO: use tok.all_special_ids to remove