The imagenet dataset that I downloaded from ILSVRC has two sub-folders
Out of the above 3, the second folder, i.e. “Data” folder seems to have the .jpeg files.
This folder has a single subfolder called CLS-LOC, which further has 3 subfolders
2 a) test
2 b) train
While training and testing, I use the following for loading datasets
traindir = '/home/ec2-user/anaconda3/ILSVRC/Data/CLS-LOC/train' trainset = datasets.ImageFolder(traindir,t_train) train_set = torch.utils.data.DataLoader(trainset,batch_size=bsz,shuffle=True,num_workers=4,pin_memory=True)
while for validation, I use the following
testdir = '/home/ec2-user/anaconda3/ILSVRC/Data/CLS-LOC/test' testset = datasets.ImageFolder(valdir,t_test) test_set = \ torch.utils.data.DataLoader(testset,batch_size=bsz_test,shuffle=False,num_workers=2,pin_memory=True)
However, I get the following error
“RuntimeError: Found 0 files in subfolders of: /home/ec2-user/anaconda3/ILSVRC/Data/CLS-LOC/test
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif”
I am confused what to do?