When running the lesson2-image_models.ipynb notebook, on this step
list_paths = [f"{PATH}train-jpg/train_0.jpg", f"{PATH}train-jpg/train_1.jpg"]
titles=[“haze primary”, “agriculture clear primary water”]
plots_from_files(list_paths, titles=titles, maintitle=“Multi-label classification”)
I get an error:
FileNotFoundError Traceback (most recent call last)
in
1 list_paths = [f"{PATH}train-jpg/train_0.jpg", f"{PATH}train-jpg/train_1.jpg"]
2 titles=[“haze primary”, “agriculture clear primary water”]
----> 3 plots_from_files(list_paths, titles=titles, maintitle=“Multi-label classification”)
~/fastai/courses/dl1/fastai/plots.py in plots_from_files(imspaths, figsize, rows, titles, maintitle)
36 sp.axis(‘Off’)
37 if titles is not None: sp.set_title(titles[i], fontsize=16)
—> 38 img = plt.imread(imspaths[i])
39 plt.imshow(img)
40
~/anaconda3/envs/fastai/lib/python3.6/site-packages/matplotlib/pyplot.py in imread(fname, format)
2147 @docstring.copy_dedent(matplotlib.image.imread)
2148 def imread(fname, format=None):
-> 2149 return matplotlib.image.imread(fname, format)
2150
2151
~/anaconda3/envs/fastai/lib/python3.6/site-packages/matplotlib/image.py in imread(fname, format)
1357 'with Pillow installed matplotlib can handle ’
1358 ‘more images’ % list(handlers))
-> 1359 with Image.open(fname) as image:
1360 return pil_to_array(image)
1361
~/anaconda3/envs/fastai/lib/python3.6/site-packages/PIL/Image.py in open(fp, mode)
2607
2608 if filename:
-> 2609 fp = builtins.open(filename, “rb”)
2610 exclusive_fp = True
2611
FileNotFoundError: [Errno 2] No such file or directory: ‘data/planet/train-jpg/train_0.jpg’
I’m wondering if I missed a step where I need to get the data before starting, but I can’t find it in the video or notes. There’s an earlier step for setting up the data on Crestle, but I’m using Paperspace.