How to load your image dataset in python
I have a folder (on my windows desktop) containing the images I want to use to build my deep learning classifier. I also have one .csv file which has the image number (for example img_1035) and the corresponding class label. How do I load the dataset with the labels into python/jupyter notebooks?
This is the link to the dataset on kaggle (https://www.kaggle.com/debdoot/bdrw).

I would preferably like to use PyTorch to do this but any other ways would also be highly appreciated.  

Luckily, PyTorch has a convenient "ImageFolder" class that you can extend to create your own dataset.

Here's an example of a dataset that uses ImageFolder:

class MyDataset(torchvision.datasets.ImageFolder):

def __init__(self, train_folder_path='.', transform=None, target_transform=None):
    super().__init__(train_folder_path, transform, target_transform)

# [ Some functions omitted ]


Then you load your set using PyTorch's "DataLoader". 
Here's an example for a training set:

training_set = MyDataset(root_path, transform)
train_loader = torch.utils.data.DataLoader(training_set, batch_size=batch_size, shuffle=True)


Using the train loader you can get batches from your dataset. You can then use these batches to train / validate and so on:

batch = next(iter(train_loader))
images, labels = batch


Training is a rather involved process so I'm not entirely sure how deep you want to dive here. I hope this was a nudge in the right direction.
