I'm following an article which says the test folder should also contain a single folder inside which all the test images are present(there will not be subfolders/label folders). On the other hand the train and validation folders should contain ānā folders each containing images of the respective classes. For example:
structure 1
/Data
//train
classA folder
classB folder
classC folder
//val
classA folder
classB folder
classC folder
//test
test folder
Again, I learned about using the python library split-folder which splits the data in the following structure,
structure 2
/Data
//train
classA folder
classB folder
classC folder
//val
classA folder
classB folder
classC folder
//test
classA folder
classB folder
classC folder
I implemented one by using the python library split-folder (structure 2) and evaluated the model by using the following method,
model.evaluate(test_generator,batch_size=32)
here I only provided test_generator(which I got from flow_from_directory) to my evaluate function(I did not use any labels) and I got accuracy around 88%. my confusions are:
- Which structure should I follow for the data splitting?
- How can I evaluate or predict my model if I use structure 1? How can I extract labels from the data?
- How, despite the fact that I did not supply any labels, the Python library split-folder is evaluating the model without throwing an error?