Datasets:
Update v-lol-trains.py
Browse files- v-lol-trains.py +3 -3
v-lol-trains.py
CHANGED
@@ -109,8 +109,8 @@ class vloltrains(datasets.GeneratorBasedBuilder):
|
|
109 |
archive_path = os.path.join(dl_manager.download_and_extract(self.config.data_url), self.config.data_url.split('/')[-1].split('.')[0])
|
110 |
# print containg folders
|
111 |
print(os.listdir(archive_path))
|
112 |
-
image_dir = os.path.join(archive_path, "
|
113 |
-
metadata_pth = os.path.join(archive_path, "
|
114 |
self.images, self.y, self.trains, self.masks = [], [], [], []
|
115 |
# ds settings
|
116 |
# load data
|
@@ -156,4 +156,4 @@ class vloltrains(datasets.GeneratorBasedBuilder):
|
|
156 |
|
157 |
def _generate_examples(self, image_dir, labels, images):
|
158 |
for i, (image, label) in enumerate(zip(images, labels)):
|
159 |
-
yield i, {"image": os.path.join(image_dir, image), "label": label}
|
|
|
109 |
archive_path = os.path.join(dl_manager.download_and_extract(self.config.data_url), self.config.data_url.split('/')[-1].split('.')[0])
|
110 |
# print containg folders
|
111 |
print(os.listdir(archive_path))
|
112 |
+
image_dir = os.path.join(archive_path, "images")
|
113 |
+
metadata_pth = os.path.join(archive_path, "all_scenes", "all_scenes.json")
|
114 |
self.images, self.y, self.trains, self.masks = [], [], [], []
|
115 |
# ds settings
|
116 |
# load data
|
|
|
156 |
|
157 |
def _generate_examples(self, image_dir, labels, images):
|
158 |
for i, (image, label) in enumerate(zip(images, labels)):
|
159 |
+
yield i, {"image": os.path.join(image_dir, image), "label": label}
|