idealwhite / tdanet

The pytorch implementation of the paper "text-guided neural image inpainting" at MM'2020 (oral)
85 stars 9 forks source link

Key error #7

Closed QijinXu closed 3 months ago

QijinXu commented 3 months ago

Hello! When I was trying to test the pretrained model on COCO, this error happened.

File "E:\xqj\paper\dl_and_ai_paper\image_inpainting\image_completion_code\tdanet-master\tdanet-master\dataloader\data_loader.py", line 81, in _load_text_idx captions = self.captions[img_name] KeyError: 'COCO_val2014_000000203564.jpg'

It seems that the dictionary constructed by the file 'caption.json' under coco doesn't have the key, which is in the file 'valid.flist'. Could you please upload the corresponding file or introduce your method for preprocessing caption-image mapping?

QijinXu commented 3 months ago

Sorry, I noticed that I forgot to modify the configuration file path. It is now working properly.