Structuring image data. Train test valid sample split


Hey there everyone,
I have two folders of image data. Helicopters and jets. I have 94 images of each in respective folders. Is there any effficient script to structure this into the fast ai dogs cats folder structure?
i.e… test1 train tmp valid sample.


It is described in the following presentation


the tricky part is just renaming. copying to the folders is easy. I have scripts for that. please see the pdf file above