Chris Oswald commited on
Commit
5ce6d63
1 Parent(s): a803284

added default for demo

Browse files
Files changed (1) hide show
  1. SPIDER.py +7 -6
SPIDER.py CHANGED
@@ -63,6 +63,7 @@ MIN_IVD = 0
63
  MAX_IVD = 9
64
  DEFAULT_SCAN_TYPES = ['t1', 't2', 't2_SPACE']
65
  DEFAULT_RESIZE = (512, 512, 30)
 
66
 
67
  _CITATION = """\
68
  @misc{vandergraaf2023lumbar,
@@ -404,12 +405,12 @@ class SPIDER(datasets.GeneratorBasedBuilder):
404
 
405
  # DEMO configuration: subset first 10 examples
406
  if self.config.name == "demo":
407
- train_image_files = train_image_files[:10]
408
- train_mask_files = train_mask_files[:10]
409
- validate_image_files = validate_image_files[:10]
410
- validate_mask_files = validate_mask_files[:10]
411
- test_image_files = test_image_files[:10]
412
- test_mask_files = test_mask_files[:10]
413
 
414
  return [
415
  datasets.SplitGenerator(
 
63
  MAX_IVD = 9
64
  DEFAULT_SCAN_TYPES = ['t1', 't2', 't2_SPACE']
65
  DEFAULT_RESIZE = (512, 512, 30)
66
+ DEMO_SUBSET_N = 10
67
 
68
  _CITATION = """\
69
  @misc{vandergraaf2023lumbar,
 
405
 
406
  # DEMO configuration: subset first 10 examples
407
  if self.config.name == "demo":
408
+ train_image_files = train_image_files[:DEMO_SUBSET_N]
409
+ train_mask_files = train_mask_files[:DEMO_SUBSET_N]
410
+ validate_image_files = validate_image_files[:DEMO_SUBSET_N]
411
+ validate_mask_files = validate_mask_files[:DEMO_SUBSET_N]
412
+ test_image_files = test_image_files[:DEMO_SUBSET_N]
413
+ test_mask_files = test_mask_files[:DEMO_SUBSET_N]
414
 
415
  return [
416
  datasets.SplitGenerator(