apal commited on
Commit
7823bd1
·
1 Parent(s): f9da925

Update SkyScenes.py

Browse files
Files changed (1) hide show
  1. 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
- # if file_path.startswith(_IMAGES_DIR):
105
- # if file_path[len(_IMAGES_DIR) : -len(".png")] in files_to_keep:
106
- # label = file_path.split("/")[2]
107
  yield file_path, {
108
  "image": {"path": file_path, "bytes": file_obj.read()},
109
- # "label": label,
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
+ }