How to load image dataset in pytorch

I am Pankaj, I want to use CNN to classify images into 5 classes with my dataset. Each class have 5000 images in separate folders. How to load this dataset into pytorch ? I am stuck here from past few days. plz help.

You could try to use ImageClassiferData.from_paths. Have you looked into lesson1 notebook here: https://github.com/fastai/fastai/blob/master/courses/dl1/lesson1.ipynb or a more elaborate version https://medium.com/@hiromi_suenaga/deep-learning-2-part-1-lesson-1-602f73869197

1 Like