Can’t use ImageFolder.
Hi! I want to load my image dataset, and I want to use ImageFolder to do that. this is my code:
from datasets import load_dataset
dataset = load_dataset(“imagefolder”, data_dir= “./folder”)
and this is the error:
ValueError : At least one data file must be specified, but got data_files=None
and this is my folder structure:
folder/train/label_0/x1.png
folder/train/label_0/xn.png
folder/train/label_1/x1.png
folder/train/label_1/xn.png
.
.
.
folder/train/label_9/x1.png
folder/train/label_9/xn.png
I would appreciate it if anyone could help me with that and give me some tips to use ImageFolder in a proper manner.