As you might see in the image the test folder is also loaded in the training data set and is considered as a class.
This is an imagenet data structure, so ideally the images in test set should not go into the training dataset. Is this because of a library bug or am I missing something?
I tried inferencing using predict but since my test data set is very large, it takes a lot of time to run.
For anyone still facing this issue.
I found a work around to it.
Try
data = (ImageItemList.from_folder(path/"train") # Where to find the data? -> in path and its subfolders
.random_split_by_pct() # How to split in train/valid? -> use the folders
.label_from_folder() #How to label? -> # depending on the folder of the filenames
.add_test(ItemList.from_folder(path=path/"test-images",label=None))
.transform(get_transforms(),size=224) # Data augmentation? -> use tfms with a size of 64
.databunch(bs=bs).normalize(imagenet_stats))
@rishabh This is is not working for me. I am getting error . Please suggest how to fix the issue
TypeError: unsupported operand type(s) for /: ‘str’ and ‘str’