No such file or directory in ImageDataLoaders

ImageDataLoaders is adding some back slashes by itself into my path.

i have a dataframe with name and label. and i also specify my train path.
this is my project folder

this is my dataframe

and then i tried to run this code
imgDataLoader = ImageDataLoaders.from_df(df, path=’.’)

and it gives me an error “No such file or directory: ‘.\train/0da228c5bd56a6eb19e95945023e3c0b2d69781c’”.

Even though when i print(path) it gives me “‘train/a372fb64497af9e1d27d2b9b61ae2cd039028399’”

how can i solve it?

Are you on Windows ?

It seems to me that it is a problem of using the string test/0da228...81c rather than the a Path() object. This means that the separator / is incorrect (on Windows). So I suggest trying to change name column to contain paths.

df['name'] =

(code not tested)

I have a similar problem - I’m using an absolute path, and fastai is adding on .\ before it.
So I get paths .\\C:\\dir1\\dir2\\image.jpg which throw an error.

Can anyone help me with this?