Hi,
I need to split my images to validation and train set in cross validation, in a way that images of each patient be either in train or validation. each patient has about 8-11 images.
root
|___patien_1 im1
|                      | __ im2 …
|
|___patient_2 im1
|                       | __ im2 …
|
.
.
.
how I can split images based on patient folders?