Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
100K<n<1M
ArXiv:
License:
Test multilabel
Browse files
NIH-Chest-X-ray-dataset.py
CHANGED
@@ -86,10 +86,10 @@ class XChest(datasets.GeneratorBasedBuilder):
|
|
86 |
"image_file_path": datasets.Value("string"),
|
87 |
"image": datasets.Image(),
|
88 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
}
|
94 |
),
|
95 |
supervised_keys=("image", "labels"),
|
@@ -154,6 +154,6 @@ class XChest(datasets.GeneratorBasedBuilder):
|
|
154 |
"image_file_path": path,
|
155 |
"image": path,
|
156 |
"labels": label_csv[label_csv['Image Index'] == image_id]['Finding Labels'].values[0].split('|')[0],
|
157 |
-
|
158 |
}
|
159 |
|
|
|
86 |
"image_file_path": datasets.Value("string"),
|
87 |
"image": datasets.Image(),
|
88 |
"labels": datasets.features.ClassLabel(names=_NAMES),
|
89 |
+
"multi-labels": datasets.features.Sequence(
|
90 |
+
datasets.features.ClassLabel(num_classes=len(_NAMES),
|
91 |
+
names=_NAMES)
|
92 |
+
)
|
93 |
}
|
94 |
),
|
95 |
supervised_keys=("image", "labels"),
|
|
|
154 |
"image_file_path": path,
|
155 |
"image": path,
|
156 |
"labels": label_csv[label_csv['Image Index'] == image_id]['Finding Labels'].values[0].split('|')[0],
|
157 |
+
"multi-labels": label_csv[label_csv['Image Index'] == image_id]['Finding Labels'].values[0].split('|'),
|
158 |
}
|
159 |
|