Datasets:
Tasks:
Image Segmentation
Modalities:
Image
Sub-tasks:
semantic-segmentation
Languages:
English
Size:
10K - 100K
License:
Update RSNA-ATD2023.py
Browse files- RSNA-ATD2023.py +6 -6
RSNA-ATD2023.py
CHANGED
@@ -62,17 +62,17 @@ class RSNAATD(datasets.GeneratorBasedBuilder):
|
|
62 |
),
|
63 |
]
|
64 |
|
65 |
-
def sort_key(self, x):
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
|
71 |
def _generate_examples(self, images, masks, metadata):
|
72 |
df = pd.read_csv(metadata)
|
73 |
|
74 |
for idx, ((image_path, image), (mask_path, mask)) in enumerate(
|
75 |
-
|
76 |
):
|
77 |
row = df.loc[df["path"] == image_path.lower().replace("images/", "")]
|
78 |
|
|
|
62 |
),
|
63 |
]
|
64 |
|
65 |
+
# def sort_key(self, x):
|
66 |
+
# patient_id, series_id, frame_id = (
|
67 |
+
# x[0][0].replace("images/", "").replace(".png", "").split("_")
|
68 |
+
# )
|
69 |
+
# return int(patient_id), int(series_id), int(frame_id)
|
70 |
|
71 |
def _generate_examples(self, images, masks, metadata):
|
72 |
df = pd.read_csv(metadata)
|
73 |
|
74 |
for idx, ((image_path, image), (mask_path, mask)) in enumerate(
|
75 |
+
zip(images, masks)
|
76 |
):
|
77 |
row = df.loc[df["path"] == image_path.lower().replace("images/", "")]
|
78 |
|