Update SkyScenes.py
Browse files- SkyScenes.py +4 -5
SkyScenes.py
CHANGED
|
@@ -101,10 +101,9 @@ def _generate_examples(self, images, metadata_path):
|
|
| 101 |
with open(metadata_path, encoding="utf-8") as f:
|
| 102 |
files_to_keep = set(f.read().split("\n"))
|
| 103 |
for file_path, file_obj in images:
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
yield file_path, {
|
| 108 |
"image": {"path": file_path, "bytes": file_obj.read()},
|
| 109 |
-
|
| 110 |
-
}
|
|
|
|
| 101 |
with open(metadata_path, encoding="utf-8") as f:
|
| 102 |
files_to_keep = set(f.read().split("\n"))
|
| 103 |
for file_path, file_obj in images:
|
| 104 |
+
if file_path.startswith(_IMAGES_DIR):
|
| 105 |
+
if file_path[len(_IMAGES_DIR) : -len(".jpg")] in files_to_keep:
|
| 106 |
+
label = file_path.split("/")[2]
|
| 107 |
yield file_path, {
|
| 108 |
"image": {"path": file_path, "bytes": file_obj.read()},
|
| 109 |
+
}
|
|
|