SadmanSakib93 / Stratified-k-fold-cross-validation-Image-classification-keras

This python program demonstrates image classification with stratified k-fold cross validation technique.
35 stars 15 forks source link

Question about using Kfolds with flow_from_directory #1

Closed Sicily-F closed 3 years ago

Sicily-F commented 3 years ago

hi there! Great code - this is so useful and thank you so much for sharing it- can I just ask - I don't quite understand which part of your code the splits occur, because you still use the training path argument in the generator. Any advice would be great - I have a data in a similar folder structure, train, val and test folders with a folder per class

thanks!

SadmanSakib93 commented 3 years ago

Hello, thanks for the feedback. I would be glad if it helps somehow. The train-test split occurs in the line number 66 (using the custom-defined transferAllClassBetweenFolders function) And the validation split happens in line number 167