JDAI-CV / image-captioning

Implementation of 'X-Linear Attention Networks for Image Captioning' [CVPR 2020]
268 stars 52 forks source link

Problems about the provided annotations file #15

Closed jlxy closed 3 years ago

jlxy commented 4 years ago

Hello, thanks for this good work. I think I downloaded and placed the annotations file right, because I can read the captions and image_ids out of the data. The problem I met is a KeyError in coco-caption/pycocotools/coco.py, when running if self.dataset['type'] == 'instances':. This suggests that the dict self.data read from ./mscoco/misc/captions_val5k.json, should has the key "type", but it doesn't. Please help!

jlxy commented 4 years ago

Could you please provide the code that produce the annotations files?

mymuli commented 4 years ago

由于python版本原因,将 if self.dataset['type'] == 'instances': 替换为: if type(self.dataset) == 'instances':

YehLi commented 3 years ago

You can remove the "if self.dataset['type'] == 'instances'" block in coco.py. The annotation of segmentation is not used for image captioning.