pyaf / DenseNet-MURA-PyTorch

Implementation of DenseNet model on Standford's MURA dataset using PyTorch
https://medium.com/@pyaf/implementing-densenet-on-mura-using-pytorch-f39e92566815
MIT License
74 stars 33 forks source link

IndexError: list index out of range #14

Open tobimichigan opened 4 years ago

tobimichigan commented 4 years ago

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?

great-energizer commented 4 years ago

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.