I am creating a databunch using Image List. Following is the code. Please help me identify where am I going wrong?
data = (ImageList.from_df(df1, path)
This is the glimpse of the dataframe(df1)
and these are the contents of path.
I am getting an error that “argument 1 must be an iterator”
First, try adding each item individually. E.g.
data = ImageList.
data = data.split_by_rand_pct()…
Can you tell me which specifically fails?
it fails at
Are you sure that there is a space between what you want your labels to be? In the df?
Sorry, I uploaded a different screenshot of dataframe’s image. Please see this.
Can you try
label_from_df(sep=' ') ? Athough, I’m not too sure that’s the error though. Also try
from_csv instead of
from_df. Even I used to struggle with creating data bunches when I was getting started. Keep playing around with the data block api and reading other people’s notebooks to get a good idea about it.
Check this notebook of mine if it helps.
Hi @dipam7 I am still struggling with the same error. But I will get through it soon. I tried from_csv too but failed. Also the keyword sep has been updated to label_delim
Thank you for responding. Cheers!