Hi,
I’m getting the following error when I’m trying to use ImageFileList
name 'ImageFileList' is not defined
Has this class been removed?
Hi,
I’m getting the following error when I’m trying to use ImageFileList
name 'ImageFileList' is not defined
Has this class been removed?
Its now called ImageItemList and extends ItemList instead of InputList
You can find examples for use of the new class in:
tests/test_vision_data_block.py
You can also create a data bunch for multiclass classification like this now (yey):
data = ImageDataBunch.from_df(PATH, df_labels, folder='train', suffix='.jpg', fn_col=0, label_col=1, sep=' ', ds_tfms=tfms, size=224)
Then if you want to make sure your target has multi class labels
type(data.train_ds.y)
Just want to put this out there, in case future readers bump into this issue.
ImageFileList
is now called ImageItemList
everywhere. I think it was working fine from Oct 30 to before Nov 13.
class ImageFileList(InputList):
class ImageItemList(ItemList):
src = (ImageFileList.from_folder(path))
src = (ImageItemList.from_folder(path))
Unfortunately, we cannot edit the lesson video to reflect this change. If you are typing the code by following the video like I do, do note of this breaking changes (huge refactor of the data block API). I believe this change was released in fastai version 1.0.24 as you mentioned:
seems it now change to ImageList
data = (ImageList.from_folder(path)
.split_by_folder(train='train', valid='valid')
.label_from_folder()
.transform(get_transforms(do_flip=False),size=224)
.databunch()
.normalize() )