DenseNet-MURA-PyTorch icon indicating copy to clipboard operation
DenseNet-MURA-PyTorch copied to clipboard

IndexError: list index out of range

Open tobimichigan opened this issue 4 years ago • 1 comments

While trying to run your code, from main.py the following error occurs:

Traceback (most recent call last): File "DenseNet-MURA-PyTorch/main.py", line 12, in <module> study_data = get_study_level_data(study_type='/XR_WRIST') File "DenseNet-MURA-PyTorch/pipeline.py", line 22, in get_study_level_data patients = list(os.walk(BASE_DIR))[0][1] # list of patient folder names IndexError: list index out of range

It seems as if pipeline.py depends on main.py or vice versa Besides, where in the code do you actually declare the root dir for the dataset?

tobimichigan avatar Feb 27 '20 22:02 tobimichigan

In pipeline.py file, for phase in data_cat: BASE_DIR = 'MURA-v1.0/%s/%s/' % (phase, study_type) patients = list(os.walk(BASE_DIR))[0][1]

you need to change folder name from MURA-v1.0 to MURA-v1.1. The data is updated.

great-energizer avatar Jun 11 '20 09:06 great-energizer