Hi, how do I get the original filenames for a test folder? Created a ImageDataBunch like so passing in a folder ‘test’:
data = ImageDataBunch.from_df(ROOT_PATH, trn_csv,'train_png', ds_tfms=get_transforms(), size=224, suffix='.png', sep=" ", test='test')
# created a learn from ConvLearner
fbeta = Fbeta()
learn = ConvLearner(data, models.resnet34, metrics=fbeta)
# ran learn fit
# ran learn.get_preds with is_test true
pred_test, y_test = learn.get_preds(is_test=True)
# how do I get the original filenames for the predictions?
Now I’m preparing a CSV to submit results to Kaggle. How do I get the original filenames from the test directory?
Seems that it’s in the data object
# to get original filenames