Closed avBuffer closed 8 months ago
Hi @avBuffer,
the problem seems to be with the matching in this line. Did you name your file for the predictions correctly, i.e. filename_0000.file_ending
?
Best, Yannick
Hi all,
I just run into the same problem. The reason in my case were additional files in the input folder (which of course did not have the required filename-structure filename_0000.file_ending) . After I removed them, everything worked as expected.
Best, Lukas
(base) PS D:\workspace\nnUNet> nnUNetv2_predict.exe -i nnUNet_raw/Dataset001_BrainTumour/imagesTs -o out_results -d 001 -c 3dfullres -f all -chk checkpoint best.pth --save_probabilities
####################################################################### Please cite the following paper when using nnU-Net: Isensee, F., Jaeger, P. F., Kohl, S. A., Petersen, J., & Maier-Hein, K. H. (2021). nnU-Net: a self-configuring method for deep learning-based biomedical imag e segmentation. Nature methods, 18(2), 203-211. #######################################################################
There are 1 cases in the source folder Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\ProgramData\anaconda3\Scripts\nnUNetv2_predict.exe__main__.py", line 7, in
File "D:\workspace\nnUNet\nnunetv2\inference\predict_from_raw_data.py", line 843, in predict_entry_point
predictor.predict_from_files(args.i, args.o, save_probabilities=args.save_probabilities,
File "D:\workspace\nnUNet\nnunetv2\inference\predict_from_raw_data.py", line 238, in predict_from_files
self._manage_input_and_output_lists(list_of_lists_or_source_folder,
File "D:\workspace\nnUNet\nnunetv2\inference\predict_from_raw_data.py", line 163, in _manage_input_and_output_lists
caseids = [os.path.basename(i[0])[:-(len(self.dataset_json['file_ending']) + 5)] for i in
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\workspace\nnUNet\nnunetv2\inference\predict_from_raw_data.py", line 163, in
caseids = [os.path.basename(i[0])[:-(len(self.dataset_json['file_ending']) + 5)] for i in
~^^^
IndexError: list index out of range
(base) PS D:\workspace\nnUNet>