Alxaline / BraTS21

Solution of the RSNA/ASNR/MICCAI Brain Tumor Segmentation (BraTS) Challenge 2021
Apache License 2.0
16 stars 5 forks source link

Python inference script not running #1

Closed sehgal15 closed 10 months ago

sehgal15 commented 10 months ago

Hi @Alxaline,

Thank you for sharing your work. I am trying to run the inference command after downloading the weights and get the following error:

EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] EquiUnetASSP features: [48, 96, 192, 384] Traceback (most recent call last): File "/home/miniconda3/envs/BraTS21/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/miniconda3/envs/BraTS21/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/BraTS21/src/main_inference.py", line 96, in <module> main() File "/home/BraTS21/src/main_inference.py", line 92, in main True) File "/home/BraTS21/learning/engine.py", line 197, in evaluate self._set_meters(args, len(data_loader), f"Epoch Valid: [{epoch}]", step_mode=step_mode) TypeError: object of type 'NoneType' has no len()

Input folder has following files:

BraTS2021_00621_flair.nii.gz BraTS2021_00621_seg.nii.gz BraTS2021_00621_t1.nii.gz BraTS2021_00621_t1ce.nii.gz BraTS2021_00621_t2.nii.gz

Can you please help?

sehgal15 commented 10 months ago

Fixed: Input folder directory was incorrectly passed. Input directory should be one level up from the Brats folders