Get_image_files not defined

Problem is fairly straight forward. I had written some code a few months back that executed perfectly. However, today I installed a fresh instance of fastai and jupyter and re-ran the code, but came across this error:

“NameError: name ‘get_image_files’ is not defined”

My import statements are:

from import *
from fastai.metrics import error_rate
from IPython.display import Image
from pathlib import Path

Am I missing an import statement? I’m 99% sure the old code had only these import statements, and worked. Here are my statements:

path = Path("…/ChinaSet_AllFiles/ChinaSet_AllFiles/CXR_png/")
tiles = get_image_files(path)

I tried this all on colab, same error.

Please do help me out - thank you!

Hey, could you try from import * as your import? Are you trying to use the new fastai library (which used to be called v2) or the old one (v1)?

1 Like