The first task I perform is usually to turn the folders of images into a structured index so they can be better managed as a dataframe. Essentially put all the images in a single folder, with a csv labelling each image as to the folder it was previously in. There are many ways to do this, but here is one that has been posted on this forum. You can then split this into whatever sets you need using the structured techniques you already know.