Chris Oswald commited on
Commit
18d6eb1
1 Parent(s): c510c2b
Files changed (1) hide show
  1. SPIDER.py +2 -2
SPIDER.py CHANGED
@@ -462,6 +462,7 @@ class SPIDER(datasets.GeneratorBasedBuilder):
462
  })
463
  assert len(patient_grades) == MAX_IVD, "Rad. gradings not padded correctly"
464
  grades_dict[str(patient_id)] = patient_grades
 
465
 
466
  # Import image and mask data
467
  image_files = [
@@ -541,8 +542,7 @@ class SPIDER(datasets.GeneratorBasedBuilder):
541
  if k not in ['Patient', 'IVD label']
542
  }
543
  patient_grades_dict[key] = value
544
- print(example, patient_grades_dict)
545
- print('Checkpoint 1')
546
  # Prepare example return dict
547
  return_dict = {'patient_id':patient_id, 'scan_type':scan_type}
548
  # if raw_image:
 
462
  })
463
  assert len(patient_grades) == MAX_IVD, "Rad. gradings not padded correctly"
464
  grades_dict[str(patient_id)] = patient_grades
465
+ assert all([len(x) == MAX_IVD for x in grades_dict.values()])
466
 
467
  # Import image and mask data
468
  image_files = [
 
542
  if k not in ['Patient', 'IVD label']
543
  }
544
  patient_grades_dict[key] = value
545
+
 
546
  # Prepare example return dict
547
  return_dict = {'patient_id':patient_id, 'scan_type':scan_type}
548
  # if raw_image: