Hello, author, I run according to your test.py. The following problems occur. What is the reason? We look forward to you.
Working with 1 GPUs
invalid literal for int() with base 10: ''
using default group number
[24, 48, 96, 192]
total number of trainable parameters 4793895
Validation Input Directory /input
Bench Test dataset number of batch: 1
=> loading checkpoint runs/brats_2021/model_1/model_best.pth.tar
=> loaded checkpoint 'runs/brats_2021/model_1/model_best.pth.tar' (epoch 3)
Traceback (most recent call last):
File "test.py", line 117, in
main(arguments)
File "test.py", line 111, in main
generate_segmentations(bench_loader, model_1, args)
File "test.py", line 40, in generate_segmentations
for i, batch in enumerate(data_loader):
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1224, in _next_data
return self._process_data(data)
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1250, in _process_data
data.reraise()
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_utils.py", line 457, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in getitem
patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]}
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in
patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]}
File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 67, in load_nii
return sitk.GetArrayFromImage(sitk.ReadImage(str(path_folder)))
File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/SimpleITK/SimpleITK.py", line 8876, in ReadImage
return _SimpleITK.ReadImage(*args)
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:99:
sitk::ERROR: The file "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/BRATS2021/Data/valid/BraTS2021_00046_t1.nii.gz" does not exist.