In the following article there is an instruction that dataset needs to be divided into train, validation and test folders where the test folder should not contain the labeled subfolders. Instead it should only contain a single folder (i.e. Test_folder).
When I use the following code, I get the output message refering that no image were found.
Ver.1:
test_generator = test_datagen.flow_from_directory(
"dataset\\test\\test_folder\\",
target_size=(IMG_WIDTH, IMG_HEIGHT),
batch_size=1,
class_mode=None,
shuffle=False,
seed=10)
Output message: "Found 0 images belonging to 0 classes.".
Instead, if I use the same folder structure (dataset\test\class_a\test_1.jpg etc) as in the train and validation folders, everything seems to be OK and I manage to evaluate my model.
Ver.2:
test_generator = test_datagen.flow_from_directory(
"dataset\\test\\",
target_size=(IMG_WIDTH, IMG_HEIGHT),
batch_size=32,
class_mode='categorical',
shuffle=False,
seed=10)
Output message: "Found 1500 images belonging to 3 classes.".
I also tried the recommendation where 'classes' attribute is specified but still 0 images were found.
Ver.3:
test_generator = test_datagen.flow_from_directory(
"dataset2\\test\\test_folder\\",
target_size=(IMG_WIDTH, IMG_HEIGHT),
batch_size=1,
classes=['test'],
class_mode=None,
shuffle=False,
seed=10)
Output message: Found 0 images belonging to 1 classes.
Thus, what is the correct way to call flow_from_directory() method and why am I getting the message that no files were found? Is my model not correctly evaluated when I use the Ver.2 solution?