I have folder full of images and for testing i m giving path to ImageDataBunch
data = ImageDataBunch.from_folder (' ./data/', ds_tfms=get_transforms(), test='./test/', size=224, num_workers=10)
I am getting good accuracy but when i submit the predictions i got really low accuracy as my test data set that is loaded is not in order nd hence giving predictions on
p = learn_cnn.get_preds(ds_type=DatasetType.Test)
I debug and check that images in folder and images in test data set are not in same order
i checked that by
data.test_ds[4][0]
And then i go to my folder and verify that 4(th) image ( keeping in mind of 0th element ) are not same
so when i
p = learn_cnn.get_preds(ds_type=DatasetType.Test)
This will obviously predict for different order
So how can i load test data in order for folder ?
in other words
Why this ? test_df.iloc[4] is not same as data.test_ds[4][0]