Closed chagmgang closed 1 year ago
I think there may be a problem with the dataloader. Therefore, “batch_texts” may affects subsequent calculations.
dataloader = torch.utils.data.DataLoader( dataset, batch_size=128, num_workers=4, drop_last=False, shuffle=False)
You can try changing the above code as follows:
dataloader = torch.utils.data.DataLoader(dataset, batch_size=128, num_workers=4, collate_fn=get_dataset_collate_fn('mscoco_captions'), drop_last=False, shuffle=False)
Please refer to this code for details:
https://github.com/ChenDelong1999/ITRA/blob/ccf87ed79f4556b2bf0b1534d4e4507722a8b186/itra/evaluation/retrieval.py#L139-L144
@gzqy1026 For RSICD, there are five ground truth captions for each image, right?
If the retrieval model hits one of them, it would be considered a successful retrieval.
@ChenDelong1999 right.
@gzqy1026 When apply get_dataset_collate_fn('mscoco_captions')
, evaluation results is correctly printed. Thank you!
@ChenDelong1999 Yes, that's right.
My evaluation code with your model (ViT-L-14) is below.
The evaluation number is printed as below.