Update rsna-atd.py
Browse files- rsna-atd.py +7 -5
rsna-atd.py
CHANGED
@@ -36,8 +36,10 @@ class RSNAATD(datasets.GeneratorBasedBuilder):
|
|
36 |
# "test": datasets.Value("string"),
|
37 |
"patient_id": datasets.Value("int64"),
|
38 |
"series_id": datasets.Value("int64"),
|
39 |
-
"
|
40 |
-
"
|
|
|
|
|
41 |
"aortic_hu": datasets.Value("float64"),
|
42 |
"incomplete_organ": datasets.Value("int64"),
|
43 |
"bowel_healthy": datasets.Value("int64"),
|
@@ -95,7 +97,7 @@ class RSNAATD(datasets.GeneratorBasedBuilder):
|
|
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()[0]
|
98 |
-
image, mask = [hkl.load(image_path)], [hkl.load(mask_path)]
|
99 |
(
|
100 |
patient_id,
|
101 |
series_id,
|
@@ -120,8 +122,8 @@ class RSNAATD(datasets.GeneratorBasedBuilder):
|
|
120 |
yield idx, {
|
121 |
"patient_id": patient_id,
|
122 |
"series_id": series_id,
|
123 |
-
"
|
124 |
-
"
|
125 |
"aortic_hu": aortic_hu,
|
126 |
"incomplete_organ": incomplete_organ,
|
127 |
"bowel_healthy": bowel_healthy,
|
|
|
36 |
# "test": datasets.Value("string"),
|
37 |
"patient_id": datasets.Value("int64"),
|
38 |
"series_id": datasets.Value("int64"),
|
39 |
+
"image_path": datasets.Value("string"),
|
40 |
+
"mask_path": datasets.Value("string"),
|
41 |
+
# "image": datasets.Array3D(shape=(None, 512, 512), dtype="uint8"),
|
42 |
+
# "mask": datasets.Array3D(shape=(None, 512, 512), dtype="uint8"),
|
43 |
"aortic_hu": datasets.Value("float64"),
|
44 |
"incomplete_organ": datasets.Value("int64"),
|
45 |
"bowel_healthy": datasets.Value("int64"),
|
|
|
97 |
# return
|
98 |
for idx, (image_path, mask_path) in enumerate(zip(sorted(images), sorted(masks))):
|
99 |
data = df.loc[df["path"] == Path(image_path).name].to_numpy()[0]
|
100 |
+
# image, mask = [hkl.load(image_path)], [hkl.load(mask_path)]
|
101 |
(
|
102 |
patient_id,
|
103 |
series_id,
|
|
|
122 |
yield idx, {
|
123 |
"patient_id": patient_id,
|
124 |
"series_id": series_id,
|
125 |
+
"image_path": image_path,
|
126 |
+
"mask_path": mask_path,
|
127 |
"aortic_hu": aortic_hu,
|
128 |
"incomplete_organ": incomplete_organ,
|
129 |
"bowel_healthy": bowel_healthy,
|