I am working on an image regression problem and I am wondering how do I know which images are in my training and validation set? When I use data.show_batch() or learn.show_results it shows the image and the value associate with the regression. I want to know which image files these correspond too.
To set different datasets in fastai you have to set ds_type to one of these values.
So if I want to use data.show_batch for validation images, I would use
Thanks for the response. What I am trying to get is the actual image file names that are in the training and validation set.
For example if I print the output of my data bunch I get the following:
Train: LabelList (2731 items)
Image (3, 450, 450),Image (3, 450, 450),Image (3, 450, 450),Image (3, 450, 450),Image (3, 450, 450)
I need information about which images actually make up this set. I could determine it by matching the y values to my list of image files and target values but is there a simpler way?
Look at the ClassConfusion widget. I designed it for that. It works both in Jupyter and Colab
data.train_ds.items to get the paths of training images and
data.valid_ds.items for valid images.
I want to add this if you want to see results only from the validation set you can try this: