Get_image_files() returning full path instead of file name in ImageDataLoaders.from_name_func

While creating a dataloader i noticed that the get_image_files() is returning a list of path objects to each image file instead of just file name. This seems redundant because we already have passed the first parameter as path to the dataset. Is there something i am missing that this is required for ?

Is there any downside (performance? memory?) when returning path objects instead of just file names? will just give you the filename if needed, right?


Yes you are right. It will only have tiny bit affect on memory and add a little bit of steps in the code. But more importantly it seems kind of redundant right so i thought this was done knowingly for some reason. Wanted to know that reason.