Hi, I have problem with ImageDataBunch. I try to do the following.
data = ImageDataBunch.from_folder(train_path,
train="train",
test="test",
valid_pct=0.1,
ds_tfms=get_transforms(),
size=224, num_workers=4).normalize(imagenet_stats)
It is executed perfectly, but when I look the data, the label for test dataset is empty. Here is the output.
ImageDataBunch;
Train: LabelList (180 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: CategoryList
Class A,Class A,Class A,Class A,Class A
Path: dataset;
Valid: LabelList (20 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: CategoryList
Class A,Class B,Class A,Class A,Class B
Path: dataset;
Test: LabelList (120 items)
x: ImageList
Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224),Image (3, 224, 224)
y: EmptyLabelList
,,,,
Path: dataset
As you can see, the label for Test is empty. Here is my folder structure.
dataset:
|- train
|- Class A
|- Class B
|- Class C
|- Class D
|- test
|- Class A
|- Class B
|- Class C
|- Class D
What should I do in order to get label for Test set? Should I change my folder structure or is there something wrong with the code?
Thank you.