Then I downloaded it using this code but still having similar error.
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/dir/train2017/000000487118.jpg'
It would be good if you can give a hint to this issue or link to the dataset you used for this task. Thank you.
Edited:
I found that the issue was coming while extracting the downloaded COCO dataset from MS COCO dataset page. Because of the some corrupted file. Then I downloaded the dataset from kaggle and now it works fine.
Thanks for your great work. I was trying to reproduce the results of your code. However I am facing some problems about the dataset.
It would be good if you can give a hint to this issue or link to the dataset you used for this task. Thank you.
Edited:
I found that the issue was coming while extracting the downloaded COCO dataset from MS COCO dataset page. Because of the some corrupted file. Then I downloaded the dataset from kaggle and now it works fine.