lindawangg / COVID-Net

COVID-Net Open Source Initiative
Other
1.15k stars 482 forks source link

File rsna_test_patients_normal.npy not found #130

Closed spohngellert-o closed 3 years ago

spohngellert-o commented 3 years ago

Description

I am getting an issue that was previously posted about then closed: https://github.com/lindawangg/COVID-Net/issues/118

Steps to Reproduce

  1. Download the datasets as described in https://github.com/lindawangg/COVID-Net/blob/master/docs/COVIDx.md
  2. Run the file create_COVIDx_binary.ipynb (is this recommended, or create_COVIDx.ipynb).
  3. File structure as follows:
    • Actualmed-COVID-chestxray-dataset
    • COVID-19-Radiography-Database
    • covid-chestxray-dataset
    • Figure1-COVID-chestxray-dataset
    • rsna-pneumonia-detection-challenge
    • datamaker
      • create_COVIDx_binary.ipynb
      • data
      • test
      • train

Expected behavior

Dataset created

Actual behavior

The following error:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-15-1658f091297f> in <module>
     19     num_diff_patients = len(np.unique(arr))
     20     # num_test = max(1, round(split*num_diff_patients))
---> 21     test_patients = np.load('rsna_test_patients_{}.npy'.format(key)) # random.sample(list(arr), num_test), download the .npy files from the repo.
     22     # np.save('rsna_test_patients_{}.npy'.format(key), np.array(test_patients))
     23     for patient in arr:

~/anaconda3/envs/ds5500/lib/python3.7/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
    414             own_fid = False
    415         else:
--> 416             fid = stack.enter_context(open(os_fspath(file), "rb"))
    417             own_fid = True
    418 

FileNotFoundError: [Errno 2] No such file or directory: 'rsna_test_patients_normal.npy'

Environment

spohngellert-o commented 3 years ago

I have managed to resolve this issue with the following steps:

  1. Download the file here: https://github.com/lindawangg/COVID-Net/blob/master/rsna_test_patients_normal.npy
  2. Save it in datamaker dir