I want to use the pretrained models from pytorch and evaluate them on imagenet val data. That should be fairly straightforward, but I am getting stuck on the dataloader.
I downloaded the imagenet and the folder structure that I have is like this:
/media/SSD2/ILSVRC/
                |----Annotation
                |----ImageSets
                |----Data
                      |----CLS-LOC
                               |----test
                               |----train
                               |----val
                                      |----ILSVRC2012_val_00000009.JPEG
                                      |----ILSVRC2012_val_00000010.JPEG
                                      |----...

First I tried datasets.ImageNet, based on pytorch 1  where it says to use the following
imagenet_data = torchvision.datasets.ImageNet('path/to/imagenet_root/')
data_loader = torch.utils.data.DataLoader(imagenet_data,
                                          batch_size=4,
                                          shuffle=True,
                                          num_workers=args.nThreads)

I changed the path_to_imagenet_to /media/SSD2/ILSVRC/ like this
torchvision.datasets.ImageNet('/media/SSD2/ILSVRC/',split='val',download=False)
but I get this error:
RuntimeError: The archive ILSVRC2012_devkit_t12.tar.gz is not present in the root directory or is corrupted. You need to download it externally and place it in /media/SSD2/ILSVRC/.

Then I tried using datasets.ImageFolder in the following way:
imagenet_data = torchvision.datasets.ImageFolder('/media/SSD2/ILSVRC/Data/CLS-LOC/val' , transform=transform)
data_loader = torch.utils.data.DataLoader(imagenet_data,
                                          batch_size=4,
                                          shuffle=True,
                                          num_workers=1)

it kinda works but the labels that generate are garbage.
I was wondering if anyone knows which one of the aforementioned methods can work and how should I do it?