Update Populus_Stomatal_Images_Datasets.py
Browse files
Populus_Stomatal_Images_Datasets.py
CHANGED
@@ -127,8 +127,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
127 |
gen_kwargs={
|
128 |
"filepaths": all_image_filenames,
|
129 |
"species_info": species_info,
|
130 |
-
"data_dir": extracted_images_path
|
131 |
-
"split":train
|
132 |
},
|
133 |
)]
|
134 |
|
@@ -155,7 +154,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
155 |
})
|
156 |
return annotations
|
157 |
|
158 |
-
def _generate_examples(self, filepaths, species_info, data_dir
|
159 |
"""Yields examples as (key, example) tuples."""
|
160 |
for file_name in filepaths:
|
161 |
image_id = os.path.splitext(file_name)[0] # Extract the base name without the file extension
|
|
|
127 |
gen_kwargs={
|
128 |
"filepaths": all_image_filenames,
|
129 |
"species_info": species_info,
|
130 |
+
"data_dir": extracted_images_path
|
|
|
131 |
},
|
132 |
)]
|
133 |
|
|
|
154 |
})
|
155 |
return annotations
|
156 |
|
157 |
+
def _generate_examples(self, filepaths, species_info, data_dir):
|
158 |
"""Yields examples as (key, example) tuples."""
|
159 |
for file_name in filepaths:
|
160 |
image_id = os.path.splitext(file_name)[0] # Extract the base name without the file extension
|