ziq commited on
Commit
b324d54
·
1 Parent(s): 80f22f7

Update rsna-atd.py

Browse files
Files changed (1) hide show
  1. rsna-atd.py +2 -3
rsna-atd.py CHANGED
@@ -93,9 +93,8 @@ class RSNAATD(datasets.GeneratorBasedBuilder):
93
  # "test": image
94
  # }
95
  # return
96
- for idx, (data, image_path, mask_path) in enumerate(zip(df.to_numpy(), images, masks)):
97
- image_path = Path(image_path) / data[0]
98
- mask_path = Path(mask_path) / data[0]
99
  image, mask = [hkl.load(image_path)], [hkl.load(mask_path)]
100
  (
101
  patient_id,
 
93
  # "test": image
94
  # }
95
  # return
96
+ for idx, (image_path, mask_path) in enumerate(zip(sorted(images), sorted(masks))):
97
+ data = df.loc[df["path"] == Path(image_path).name].to_numpy()
 
98
  image, mask = [hkl.load(image_path)], [hkl.load(mask_path)]
99
  (
100
  patient_id,