Swin UNETR Brats 0.2.1 #1593
Unanswered
EdenSehatAI
asked this question in
Q&A
Replies: 1 comment 10 replies
-
Hi @EdenSehatAI, could you please check your data? It looks like the data isn't in this location.
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In the notebook: https://github.com/Project-MONAI/tutorials/blob/main/3d_segmentation/swin_unetr_brats21_segmentation_3d.ipynb
I'm up to the training phase but am always getting this error on the 9th epoch. Why is this the case?
Val 9/50 221/250 , dice_tc: 0.7409106 , dice_wt: 0.837617 , dice_et: 0.78997755 , time 4.82s
Val 9/50 222/250 , dice_tc: 0.74006385 , dice_wt: 0.8375687 , dice_et: 0.7895737 , time 4.82s
RuntimeError Traceback (most recent call last)
in <cell line: 11>()
9 loss_epochs,
10 trains_epoch,
---> 11 ) = trainer(
12 model=model,
13 train_loader=train_loader,
5 frames
/usr/local/lib/python3.10/dist-packages/torch/_utils.py in reraise(self)
692 # instantiate since we don't know how to
693 raise RuntimeError(msg) from None
--> 694 raise exception
695
696
RuntimeError: Caught RuntimeError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/nibabel/loadsave.py", line 90, in load
stat_result = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/EdenSehat/BraTS2021_Training_Data/TrainingData/TrainingData/BraTS2021_00390/BraTS2021_00390_flair.nii.gz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 141, in apply_transform
return _apply_transform(transform, data, unpack_items, lazy, overrides, log_stats)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 98, in _apply_transform
return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/io/dictionary.py", line 162, in call
data = self.loader(d[key], reader)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/io/array.py", line 255, in call
img = reader.read(filename)
File "/usr/local/lib/python3.10/dist-packages/monai/data/image_reader.py", line 908, in read
img = nib.load(name, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/nibabel/loadsave.py", line 92, in load
raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: '/content/drive/MyDrive/EdenSehat/BraTS2021_Training_Data/TrainingData/TrainingData/BraTS2021_00390/BraTS2021_00390_flair.nii.gz'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 141, in apply_transform
return _apply_transform(transform, data, unpack_items, lazy, overrides, log_stats)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 98, in _apply_transform
return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/compose.py", line 335, in call
result = execute_compose(
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/compose.py", line 111, in execute_compose
data = apply_transform(
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 171, in apply_transform
raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.io.dictionary.LoadImaged object at 0x7c01153aa680>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/monai/data/dataset.py", line 112, in getitem
return self._transform(index)
File "/usr/local/lib/python3.10/dist-packages/monai/data/dataset.py", line 98, in _transform
return apply_transform(self.transform, data_i) if self.transform is not None else data_i
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 171, in apply_transform
raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.compose.Compose object at 0x7c01153abee0>
Beta Was this translation helpful? Give feedback.
All reactions