I downloaded a dataset from kaggle and uploaded in colab.
I gave the correct path of the required folder to ImageFolder function.
But it is showing this error
This happens everytime. Whenever I tried to create dataset from the folder path which directly contains images , it doesnât work. But when I pass the path of the folder which is one level higher than the folder containing the images then it works.
But in this case different folders are containing different kinds of images. So I donât want to create a single dataset for all of them.
What files/subfolders does âmonet_jpgâ contain?
I suspect you tried to use ImageFolder incorrectly. It expects there to be subfolders (which represent classes) with the actual images for each class. I think there are only images and no subfolders which could be used used for classification.
yes it does not have any subfolders.
And i want it that way because I am using that images for GANâs and not for Image Classification model.
So i want them all to have the same class
yes you are right the part of ganâs is classification itself but it is a binary classification and images of the fake class are generated by generators.
I will follow you instructions and create a custom dataset class
Would be good idea to make it a bit âgenericâ because it seems like common need to have such single-image dataset returning images from a specific directory.
I had somewhere such heresy so can help if you need.