Which dataloader is good for labels saved in csv file?

Hello all, I found many kinds of data loader (i.e ImageFolder, …) in pytorch. For my problem, I have a training data that organizer as:



and a csv file store the label information

111.jpg, 1

So, what kind of dataloader is good for me? Could you show some example code

I have asked something similar to your question and I find out writing a custom dataset based on Dataset abstract class is the best idea and fastest!

This is a sample as an answer to my question:

And if you are in full implemented of my work, here is the link to my Github of a simple CNN for edge detection on some custom dataset with custom loss and custom transforms.

And my dataset structure is exactly same as you. So I hope it helps you.
Thanks for any star :blush: