microsoft / TAP

TAP: Text-Aware Pre-training for Text-VQA and Text-Caption, CVPR 2021 (Oral)
MIT License
72 stars 11 forks source link

A KEYERROR need to be solved--Emergency! #22

Open MrLianSYSU opened 2 years ago

MrLianSYSU commented 2 years ago

error raise: File "/home/lianjunliang/anaconda3/envs/TAP/pythia/datasets/vqa/m4c_textvqa/dataset.py", line 112, in load_item [self.object_clsname[x] for x in features['image_info_0']['objects']] KeyError: 'objects'

we print fearures,here is what it comes: 2022-07-20T19:53:09 INFO: Starting training... **** {'image_feature_0': tensor([[0.6171, 0.5207, 0.0000, ..., 6.4700, 0.0000, 0.0000], [0.0000, 0.0000, 0.0000, ..., 2.4846, 0.0000, 0.0000], [0.0000, 0.0000, 1.2065, ..., 0.0000, 0.0000, 0.0000], ..., [0.0000, 0.0000, 1.0070, ..., 5.8578, 5.1698, 0.0000], [4.3617, 0.0000, 0.0000, ..., 0.0000, 7.6311, 0.0000], [0.0000, 0.0000, 1.4914, ..., 0.0000, 3.2282, 0.0000]]), 'image_info_0': {'max_features': tensor(100)}, 'image_feature_1': tensor([[0.6171, 0.5207, 0.0000, ..., 6.4700, 0.0000, 0.0000], [0.0000, 0.0000, 0.0000, ..., 2.4846, 0.0000, 0.0000], [0.0000, 0.0000, 1.2065, ..., 0.0000, 0.0000, 0.0000], ..., [0.0000, 0.0000, 1.0070, ..., 5.8578, 5.1698, 0.0000], [4.3617, 0.0000, 0.0000, ..., 0.0000, 7.6311, 0.0000], [0.0000, 0.0000, 1.4914, ..., 0.0000, 3.2282, 0.0000]]), 'image_info_1': {'max_features': tensor(100)}} 2022-07-20T19:53:11 ERROR: Caught KeyError in DataLoader worker process 0.