I am facing a problem when I use:
torchvision.datasets.VOCDetection(’/content’, year=‘2007’, image_set=‘train’, download=True)
The specific problem is that download and extraction is happening for VOCtest_06-Nov-2007.tar instead of VOCtrainval_06-Nov-2007.tar. My guess is that this is due to recent changes made to voc.py. Not an expert but I think problem might be here: vision/voc.py at c808d163f6c65ca851db59e9966807a9220fc493 · pytorch/vision · GitHub 1 [lines 88-94]
I am using the following hack for now and it seems to work:
torchvision.datasets.voc.DATASET_YEAR_DICT[‘2007-trainval’] = torchvision.datasets.voc.DATASET_YEAR_DICT[‘2007’]
dummy = torchvision.datasets.VOCDetection(’/content’, year=‘2007-trainval’, image_set=‘train’, download=True)
This basically downloads and extracts the right tar file and subsequent commands work.