Chris Oswald commited on
Commit
f2ef76c
1 Parent(s): 81b3fb4

added original subset indicator

Browse files
Files changed (1) hide show
  1. SPIDER.py +34 -3
SPIDER.py CHANGED
@@ -73,8 +73,37 @@ _CITATION = """\
73
  # TODO: Add description of the dataset here
74
  # You can copy an official description
75
  _DESCRIPTION = """\
76
- This new dataset is designed to solve this great NLP task and is crafted with a lot of care.
77
- """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
  _HOMEPAGE = "https://zenodo.org/records/10159290"
80
 
@@ -106,7 +135,7 @@ class CustomBuilderConfig(datasets.BuilderConfig):
106
 
107
 
108
  class SPIDER(datasets.GeneratorBasedBuilder):
109
- """TODO: Short description of my dataset."""
110
 
111
  # Class attributes
112
  DEFAULT_WRITER_BATCH_SIZE = 16 # PyArrow default is too large for image data
@@ -174,6 +203,7 @@ class SPIDER(datasets.GeneratorBasedBuilder):
174
  "TransmitCoilName": datasets.Value(dtype="string"),
175
  "WindowCenter": datasets.Value(dtype="string"),
176
  "WindowWidth": datasets.Value(dtype="string"),
 
177
  },
178
  "rad_gradings": {
179
  "IVD label": datasets.Sequence(datasets.Value("string")),
@@ -319,6 +349,7 @@ class SPIDER(datasets.GeneratorBasedBuilder):
319
  overview_dict[key] = {
320
  k:v for k,v in item.items() if k not in exclude_vars
321
  }
 
322
 
323
  # Merge patient records for radiological gradings data
324
  grades_dict = {}
 
73
  # TODO: Add description of the dataset here
74
  # You can copy an official description
75
  _DESCRIPTION = """\
76
+ This is a large publicly available multi-center lumbar spine magnetic resonance \
77
+ imaging (MRI) dataset with reference segmentations of vertebrae, intervertebral \
78
+ discs (IVDs), and spinal canal. The dataset includes 447 sagittal T1 and T2 \
79
+ MRI series from 218 studies of 218 patients with a history of low back pain. \
80
+ The data was collected from four different hospitals. There is an additional \
81
+ hidden test set, not available here, used in the accompanying SPIDER challenge \
82
+ on spider.grand-challenge.org. We share this data to encourage wider \
83
+ participation and collaboration in the field of spine segmentation, and \
84
+ ultimately improve the diagnostic value of lumbar spine MRI.
85
+
86
+ This file also provides the biological sex for all patients and the age for \
87
+ the patients for which this was available. It also includes a number of \
88
+ scanner and acquisition parameters for each individual MRI study. The dataset \
89
+ also comes with radiological gradings found in a separate file for the \
90
+ following degenerative changes:
91
+
92
+ 1.    Modic changes (type I, II or III)
93
+
94
+ 2.    Upper and lower endplate changes / Schmorl nodes (binary)
95
+
96
+ 3.    Spondylolisthesis (binary)
97
+
98
+ 4.    Disc herniation (binary)
99
+
100
+ 5.    Disc narrowing (binary)
101
+
102
+ 6.    Disc bulging (binary)
103
+
104
+ 7.    Pfirrman grade (grade 1 to 5).
105
+
106
+ All radiological gradings are provided per IVD level."""
107
 
108
  _HOMEPAGE = "https://zenodo.org/records/10159290"
109
 
 
135
 
136
 
137
  class SPIDER(datasets.GeneratorBasedBuilder):
138
+ """TODO: Short description of my dataset.""" #TODO
139
 
140
  # Class attributes
141
  DEFAULT_WRITER_BATCH_SIZE = 16 # PyArrow default is too large for image data
 
203
  "TransmitCoilName": datasets.Value(dtype="string"),
204
  "WindowCenter": datasets.Value(dtype="string"),
205
  "WindowWidth": datasets.Value(dtype="string"),
206
+ "OrigSubset":datasets.Value(dtype="string"),
207
  },
208
  "rad_gradings": {
209
  "IVD label": datasets.Sequence(datasets.Value("string")),
 
349
  overview_dict[key] = {
350
  k:v for k,v in item.items() if k not in exclude_vars
351
  }
352
+ overview_dict[key]['OrigSubset'] = item['subset'] # Change name to original subset
353
 
354
  # Merge patient records for radiological gradings data
355
  grades_dict = {}