How to balance images in folder by doing augmentation such that number of images in this folder are equal to number of images in other folder?
问题 I have 5 folders named as class_i each folder has the i class images. the images are with .jpg format. How can I balance the images in each folder by doing augmentation such that number of images in this folder will be equal to the number of images in the folder with highest number of images? Also, could you please help in plotting a curve shows number of images in each folder before and after balancing? 回答1: Just extended my other answer with algorithm that does exactly what you want in this