Loading Script for Vision Dataset

Hello HF community,

Could someone please share a sample script/documentation (other than food101 dataset provided by HF) that creates custom vision dataset for image classification. The dataset is available in image format in my local drive with following structure:
train/class_1/img1
train/class_1/img2
train/class_1/img3
…
…
train/class_2/img1
train/class_2/img2
train/class_2/img3
…
…

Looking forward to the support by :hugs: community

You can use the imagefolder loader to load such a dataset:

from datasets import load_dataset
ds = load_dataset("imagefolder", data_files="path/to/train_dir/**", split="train")