Chris Oswald commited on
Commit
c5eade3
1 Parent(s): dd91a36

moved from HF to GH repo

Browse files
Files changed (2) hide show
  1. README.md +13 -0
  2. SPIDER.py +1 -1
README.md CHANGED
@@ -163,3 +163,16 @@ The dataset is published under a CC-BY 4.0 license: https://creativecommons.org/
163
  Jasper W. van der Graaf, Miranda L. van Hooff, Constantinus F. M. Buckens, Matthieu Rutten,
164
  Job L. C. van Susante, Robert Jan Kroeze, Marinus de Kleuver, Bram van Ginneken, Nikolas Lessmann. (2023).
165
  *Lumbar spine segmentation in MR images: a dataset and a public benchmark.* https://arxiv.org/abs/2306.12217.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  Jasper W. van der Graaf, Miranda L. van Hooff, Constantinus F. M. Buckens, Matthieu Rutten,
164
  Job L. C. van Susante, Robert Jan Kroeze, Marinus de Kleuver, Bram van Ginneken, Nikolas Lessmann. (2023).
165
  *Lumbar spine segmentation in MR images: a dataset and a public benchmark.* https://arxiv.org/abs/2306.12217.
166
+
167
+
168
+
169
+
170
+ # Rescale mask intensities to [0, 255] and cast as UInt8 type
171
+ mask = sitk.Cast(sitk.RescaleIntensity(sitk.ReadImage(mask_path)), sitk.sitkUInt8)
172
+ # Rescale image intensities to [0, 255] and cast as UInt8 type
173
+ image = sitk.Cast(sitk.RescaleIntensity(image), sitk.sitkUInt8)
174
+
175
+ # NOTE: since the original array shape is not standardized, cannot return in dataset
176
+
177
+ # Images and masks are resized to (512, 512, 30) and rescaled to [0, 255] (unisgned 8-bit integers); paths to original
178
+ .mha images and masks are also provided if you would prefer to load original image (for example, using SimpleSITK library)
SPIDER.py CHANGED
@@ -268,7 +268,7 @@ class SPIDER(datasets.GeneratorBasedBuilder):
268
  split: str,
269
  scan_types: List[str],
270
  resize_shape: Tuple[int, int, int],
271
- validate_share: float = 0.3,
272
  test_share: float = 0.2,
273
  random_seed: int = 9999,
274
  ) -> Tuple[str, Dict]:
 
268
  split: str,
269
  scan_types: List[str],
270
  resize_shape: Tuple[int, int, int],
271
+ validate_share: float = 0.2,
272
  test_share: float = 0.2,
273
  random_seed: int = 9999,
274
  ) -> Tuple[str, Dict]: