The custom dataset you’ve written its probably better to name it pickle_Dataset as Dataset and DataLoader are two separate things and make the question confusing.
In the dataset class you’ve written notice how’re you’re loading all the data in the constructor.
Try loading a image in the getiitem method instead.
( create a list of all files using os.listdir in the init method and load in getitem by indexing the name)