How to split an image dataset into trains and test suites?
I am working on the 256_ObjectCategories dataset from Caltech. They organized all of the images into 256 categories in different folders. I am using Keras' ImageDataGenerator to load a dataset, but I cannot break it down into training and testing using the same. How can I do this in the terminal without moving images or changing directories? Any help is appreciated. Thank.:)
source to share
Now this is not possible out of the box with the ImageDataGenerator right now. See this thread: https://github.com/fchollet/keras/issues/5862
User AloshkaD suggests as a workaround to create an index list with glob:, rasterList = glob.glob(os.path.join(path_of_your_image_directory, '*.jpg'))
split it programmatically, and pass some of the validation of that list to a parameter validation_data
for fit_generator ().
source to share