Chris Oswald commited on
Commit
fa67d9b
·
1 Parent(s): bed4802

added feature types

Browse files
Files changed (1) hide show
  1. SPIDER.py +9 -5
SPIDER.py CHANGED
@@ -137,9 +137,13 @@ class SPIDER(datasets.GeneratorBasedBuilder):
137
  """
138
  features = datasets.Features(
139
  {
140
- "sentence": datasets.Value("string"),
141
- "option1": datasets.Value("string"),
142
- "answer": datasets.Value("string")
 
 
 
 
143
  # These are the features of your dataset like images, labels ...
144
  }
145
  )
@@ -172,8 +176,8 @@ class SPIDER(datasets.GeneratorBasedBuilder):
172
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
173
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
174
  paths_dict = dl_manager.download_and_extract(_URLS)
175
- # scan_types = self.config.scan_types
176
- scan_types = ['t1'] #TODO: remove
177
  return [
178
  datasets.SplitGenerator(
179
  name=datasets.Split.TRAIN,
 
137
  """
138
  features = datasets.Features(
139
  {
140
+ "patient_id": datasets.Value("string"),
141
+ "scan_type": datasets.Value("string"),
142
+ "raw_image": datasets.Value(sitk.Image),
143
+ "numeric_array": datasets.Value(np.array),
144
+ "metadata": datasets.Value(dict),
145
+ "rad_gradings": datasets.Value(dict),
146
+
147
  # These are the features of your dataset like images, labels ...
148
  }
149
  )
 
176
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
177
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
178
  paths_dict = dl_manager.download_and_extract(_URLS)
179
+ scan_types = self.config.scan_types
180
+ # scan_types = ['t1'] #TODO: remove
181
  return [
182
  datasets.SplitGenerator(
183
  name=datasets.Split.TRAIN,