I was testing some code from Kaggle. this is the link of the project on kaggle and i am stack at one point which gives me an error ‘NameError: name ‘ImageList’ is not defined’ when i tried to set argument ImageList into a class just like below.
i.e. i am using fastai 2.3.1
Silly questions first. Did you import vision?
Yes i did. Just like this one below
from fastai.vision import *
ImageList is not used anymore. It is part of fastai v1. For fastai v2, you may want to use ImageDataLoaders.from_df instead.
well, now it is working with ‘ImageDataLoaders’ but i am facing another issue next to it.
NameError: name ‘PathOrStr’ is not defined.
def open(self, fn:PathOrStr)->Image:
the code that i am checking out from can be found here
Looking at the kaggle code there seems to be two options 1. Install fastai 1.0.61 and run the code 2. Port the code to fastaiv2 .