Have anyone used torchvision.datasets.ImageFolder in AWS?
I met this error in predicting my pictures in my own folder
RuntimeError: Found 0 images in subfolders of: mine/1/2
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif
But, I have uploaded 3 jpg images in mine/1/2.
It also has found the folder
Is there anything I have missed?
Any suggestion will be appreciated
Did you solve your problem? I’m having the same problem.
I have the same problem. And I think that you can try the following:
data_dir = "mine"
img_data = torchvision.datasets.ImageFolder(os.path.join(data_dir))
You can look at any of the examples provided in the official documentation to see how to use it.
My understanding is to read the upper layer of the folder where the file is located.
Just like when reading many classes, instead of reading each class, it is directly read into the folder called “train”, which is the upper layer of the folder you want.