Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
100K<n<1M
ArXiv:
License:
Fix tab and indent errors
Browse files- NIH-Chest-X-ray-dataset.py +17 -15
NIH-Chest-X-ray-dataset.py
CHANGED
@@ -126,23 +126,25 @@ class ChestXray14(datasets.GeneratorBasedBuilder):
|
|
126 |
)
|
127 |
keys = ("image", "labels")
|
128 |
|
129 |
-
|
130 |
-
|
|
|
131 |
{
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
}
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
146 |
|
147 |
|
148 |
return datasets.DatasetInfo(
|
|
|
126 |
)
|
127 |
keys = ("image", "labels")
|
128 |
|
129 |
+
|
130 |
+
if self.config.name == "image-classification":
|
131 |
+
features = datasets.Features(
|
132 |
{
|
133 |
+
"image_id": datasets.Value("string"),
|
134 |
+
"patient_id": datasets.Value("int32"),
|
135 |
+
"image": datasets.Image(),
|
136 |
+
"width": datasets.Value("int32"),
|
137 |
+
"height": datasets.Value("int32"),
|
138 |
}
|
139 |
+
)
|
140 |
+
object_dict = {
|
141 |
+
"image_id": datasets.Value("string"),
|
142 |
+
"area": datasets.Values("int64"),
|
143 |
+
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
144 |
+
}
|
145 |
+
features["objects"] = [object_dict]
|
146 |
+
keys = ("image", "objects")
|
147 |
+
|
148 |
|
149 |
|
150 |
return datasets.DatasetInfo(
|