I have a folder of bunch of images and a dataframe that holds the list of training image paths and labels. I have also a similar dataframe for validation.
I am able to define a data source with this code below with splitting the training data by random in two pieces. But I have to define the validation data from an other dataframe.
# This is my lacking data source
src = (
ImageList.from_df(path=im_path, df=df_filtered)
.split_by_rand_pct(0.2)
.label_from_df(cols=['float_label_1','float_label_2'],label_cls=FloatList)
)
Is it possible to define the data source in this way?