generate examples loop
Browse files- SkyScenes.py +5 -4
SkyScenes.py
CHANGED
|
@@ -910,10 +910,11 @@ class SKYSCENES(datasets.GeneratorBasedBuilder):
|
|
| 910 |
|
| 911 |
def _generate_examples(self, images=None):
|
| 912 |
"""Generate images and labels for splits."""
|
| 913 |
-
for
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
|
|
|
| 917 |
# for j in range(len(images)):
|
| 918 |
# dict_final = {}
|
| 919 |
# filepath_img = os.listdir(images[j])
|
|
|
|
| 910 |
|
| 911 |
def _generate_examples(self, images=None):
|
| 912 |
"""Generate images and labels for splits."""
|
| 913 |
+
for f in images:
|
| 914 |
+
for file_path, file_obj in f:
|
| 915 |
+
yield file_path, {
|
| 916 |
+
"image": {"path": file_path, "bytes": file_obj.read()},
|
| 917 |
+
}
|
| 918 |
# for j in range(len(images)):
|
| 919 |
# dict_final = {}
|
| 920 |
# filepath_img = os.listdir(images[j])
|