I am trying to use a dataset having nearly 5200 classes of images and total images to be somewhere around 14000, now some of these classes have only image per class i want to use only those images which have atleast say 3 or more images per class , one way could be by iterating over the entire directory and copying the images to a new directory specifying the given condition , the dataset is of the standard ImageFolder form so i wanted to know is there any pytorchic way to sample images from the dataset while creation of dataloaders inspite of making a new directory and directly doing it via pytorch dataloaders or samplers?
If anyone can suggest any possible soln. to it . Thanks in advance.