question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot download torchio.datasets.rsna_miccai.RSNAMICCAI dataset

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Problem summary

Unable to download the dataset.

Code for reproduction

Follow code exactly as is from kaggle using:


root_dir = '/kaggle/input/rsna-miccai-brain-tumor-radiogenomic-classification'
dataset = tio.datasets.RSNAMICCAI(root_dir)
len(dataset)

nor does it work when following TorchIO example:

import torchio as tio
from subprocess import call
call('kaggle competitions download -c rsna-miccai-brain-tumor-radiogenomic-classification'.split())
root_dir = 'rsna-miccai-brain-tumor-radiogenomic-classification'
train_set = tio.datasets.RSNAMICCAI(root_dir, train=True)
test_set = tio.datasets.RSNAMICCAI(root_dir, train=False)
len(train_set), len(test_set)

Actual outcome

Nothing

Error messages

/usr/local/lib/python3.7/dist-packages/torchio/datasets/rsna_miccai.py:86: UserWarning: Labels CSV not found. Ignoring MGMT labels
  warnings.warn('Labels CSV not found. Ignoring MGMT labels')
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-21-9d2ddfa68866>](https://ojoobu4k6j-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220603-060044-RC00_452738770#) in <module>()
----> 1 tio.datasets.RSNAMICCAI(root_dir)

2 frames
[/usr/lib/python3.7/pathlib.py](https://ojoobu4k6j-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220603-060044-RC00_452738770#) in iterdir(self)
   1105         if self._closed:
   1106             self._raise_closed()
-> 1107         for name in self._accessor.listdir(self):
   1108             if name in {'.', '..'}:
   1109                 # Yielding a path object for these makes little sense

FileNotFoundError: [Errno 2] No such file or directory: '/content/rsna-miccai-brain-tumor-radiogenomic-classification/train'

Expected outcome

get dataset

System info

import re
import sys
import platform
import torchio
import torch
import numpy
import SimpleITK as sitk


sitk_version = re.findall('SimpleITK Version: (.*?)\n', str(sitk.Version()))[0]

print('Platform:  ', platform.platform())
print('TorchIO:   ', torchio.__version__)
print('PyTorch:   ', torch.__version__)
print('SimpleITK: ', sitk_version)
print('NumPy:     ', numpy.__version__)
print('Python:    ', sys.version)```

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fepegarcommented, Jun 9, 2022

Looks like you got it sorted then! Thanks for sharing those commands.

0reactions
kiristerncommented, Jun 9, 2022

Well, in the end i just ended up using the FPG dataset, haha. But that was after I investigated the following ways to download files off kaggle:

  1. Download an individual file with: !kaggle datasets download -f BraTS2020_TrainingData/MICCAI_BraTS2020_TrainingData/BraTS20_Training_001/BraTS20_Training_001_t2.nii awsaf49/brats20-dataset-training-validation

  2. Download all files from a specific folder in Kaggle: !kaggle competitions files -c rsna-miccai-brain-tumor-radiogenomic-classification | grep T2w | awk '{print $1}' | while read x ; do kaggle competitions download -f $x rsna-miccai-brain-tumor-radiogenomic-classification -p train/00000/T2w ; done

Read more comments on GitHub >

github_iconTop Results From Across the Web

torchio/datasets.rst at main - GitHub
TorchIO offers tools to easily download publicly available datasets from different institutions and modalities. The interface is similar to :mod:`torchvision.
Read more >
torchio.datasets.rsna_miccai - Read the Docs
Source code for torchio.datasets.rsna_miccai ... This is a helper class for the dataset used in the `RSNA-MICCAI Brain Tumor Radiogenomic Classification ...
Read more >
Preprocessing MRI with TorchIO - Kaggle
In this notebook, we will use TorchIO and its new RSNAMICCAI dataset class to load, preprocess and write the challenge dataset.
Read more >
Unable to download dataset - PyTorch Forums
It is just downloading and the process is not finishing can you guys help me out and it is showing this error which...
Read more >
Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries
The training dataset provides annotated T1 scans (N = 105) and ... 'Cancer Analysis', although almost all fail to secure relevant and novel ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found