Pytorch provides the dataloader for some common vision datasets.

  
      
      GitHub
  
  
    

pytorch/vision 1.2k

Datasets, Transforms and Models specific to Computer Vision - pytorch/vision


  
  
    
    
  
  


You could also follow what’s in https://github.com/pytorch/pytorch/tree/master/torch/utils/data 4.0k, and build you own.