What does Datasets.ImageFolder() returns
It returns Dataset object with contains tuples =>
Thanks. But as i was doing a competition on kaggle. Dataset was a folder of images with as imageID and a csv file of labels with the respective imageID. As i loaded the images from the folder which only had images no classes. How would classes of the images be refered. And all the classes were zero
ImageFolder will infer classes ‘cat’ and ‘dog’ if your directory is organized as follows -
root/dog/xxx.png root/dog/xxy.png root/dog/xxz.png root/cat/123.png root/cat/nsdf3.png root/cat/asd932_.png
Here’s a related thread - Custom Dataset labeling from CSV
Thanks for the link. That is what i m having trouble in.