Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
100K<n<1M
ArXiv:
License:
Add the _generate_examples method
Browse files
NIH-Chest-X-ray-dataset.py
CHANGED
@@ -135,7 +135,12 @@ class XChest(datasets.GeneratorBasedBuilder):
|
|
135 |
]
|
136 |
|
137 |
def _generate_examples(self, files):
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
141 |
|
|
|
135 |
]
|
136 |
|
137 |
def _generate_examples(self, files):
|
138 |
+
for i, path in enumerate(files):
|
139 |
+
file_name = os.path.basename(path)
|
140 |
+
if file_namae.endswith(".png"):
|
141 |
+
yield i, {
|
142 |
+
"image_file_path": path,
|
143 |
+
"image": path,
|
144 |
+
"labels": "a",
|
145 |
+
}
|
146 |
|