jfilter / split-folders

🗂 Split folders with files (i.e. images) into training, validation and test (dataset) folders
MIT License
414 stars 72 forks source link

Feature request: Input folder path #51

Open danigit opened 1 year ago

danigit commented 1 year ago

Hi, thanks for developing this library. I just wander if it would make sense and be possible to allow giving as input_folder the complete path to the folder that contains the files. For example I'm working with images and annotations and i have the following structure

data\ - images\ - im_1.jpg - im_2.jpg - ... - annotations\ - im_1.xml - im_2.xml - ...

The problem is that ratio function asks for the input_folder to be the path to a directory, which in my case would be data. But this would also split the annotations, which would be great if the split for the annotations would mirror the split for the images, but apparently it does not. It seems that the split for images is independent from the split of annotations, for example i can find im_1.jpg in the train folder and the im_1.xml in the validation folder.

Thanks, and keep on the excellent work that you are doing.