Having three csv (training,testing,validation) how can i apply CNN on it just like we do with dataset.Imagefolder and data.DataLoader

Having three csv (training, testing, validation) how can i apply CNN on it. Just like we do using dataloader for images e.g.

train_data = torchvision.datasets.ImageFolder(root=TRAIN_DATA_PATH, transform=data_transform)
train_data_loader = data.DataLoader(train_data, batch_size=batch_size,shuffle=True)

test_data = torchvision.datasets.ImageFolder(root=TEST_DATA_PATH,transform=data_transform)
test_data_loader = data.DataLoader(test_data, batch_size=test_size, shuffle=True)

val_data = torchvision.datasets.ImageFolder(root=VAL_DATA_PATH,transform=data_transform)
val_data_loader = data.DataLoader(val_data, batch_size=val_size, shuffle=True)

Could you explain a bit, what exactly is stored in these csv files?
Are the image paths or is the raw data somehow stored there?

Anyway, I think the easiest approach would be to write a custom Dataset, and load the data lazily in the __getitem__ method.

PS: I’m not a huge fan of tagging certain people, as this might demotivate other users to post an answer in your thread, who might have a way better answer than me. :wink: