Commit
·
c0354e0
1
Parent(s):
9182f57
Upload folder using huggingface_hub
Browse files- vsd-fashion.py +7 -2
vsd-fashion.py
CHANGED
@@ -163,9 +163,10 @@ class VSDFashion(datasets.GeneratorBasedBuilder):
|
|
163 |
)
|
164 |
|
165 |
def _split_generators(self, dl_manager):
|
166 |
-
|
167 |
|
168 |
-
|
|
|
169 |
|
170 |
if self.config.name == 'in_catalog_retrieval_zero_shot':
|
171 |
return [
|
@@ -178,6 +179,7 @@ class VSDFashion(datasets.GeneratorBasedBuilder):
|
|
178 |
"annotations_file": task_data_path/'in_fashion_tags_dict.json',
|
179 |
"split": "test",
|
180 |
"images_folder": self.image_folder,
|
|
|
181 |
},
|
182 |
),
|
183 |
]
|
@@ -192,6 +194,7 @@ class VSDFashion(datasets.GeneratorBasedBuilder):
|
|
192 |
"annotations_file": task_data_path/'in_fashion_outshop_tags_dict.json',
|
193 |
"split": "test",
|
194 |
"images_folder": self.image_folder,
|
|
|
195 |
},
|
196 |
),
|
197 |
]
|
@@ -206,6 +209,7 @@ class VSDFashion(datasets.GeneratorBasedBuilder):
|
|
206 |
"annotations_file": task_data_path/'in_fashion_tags_dict_train.json',
|
207 |
"split": "train",
|
208 |
"images_folder": self.image_folder,
|
|
|
209 |
},
|
210 |
),
|
211 |
datasets.SplitGenerator(
|
@@ -217,6 +221,7 @@ class VSDFashion(datasets.GeneratorBasedBuilder):
|
|
217 |
"annotations_file": task_data_path/'in_fashion_tags_dict_test.json',
|
218 |
"split": "test",
|
219 |
"images_folder": self.image_folder,
|
|
|
220 |
},
|
221 |
),
|
222 |
]
|
|
|
163 |
)
|
164 |
|
165 |
def _split_generators(self, dl_manager):
|
166 |
+
dataset_root_path = Path(snapshot_download(_HF_DATASET_ID, repo_type='dataset'))
|
167 |
|
168 |
+
dataset_path = dataset_root_path/self.config.dataset_folder
|
169 |
+
task_data_path = dataset_path/self.config.split_folder
|
170 |
|
171 |
if self.config.name == 'in_catalog_retrieval_zero_shot':
|
172 |
return [
|
|
|
179 |
"annotations_file": task_data_path/'in_fashion_tags_dict.json',
|
180 |
"split": "test",
|
181 |
"images_folder": self.image_folder,
|
182 |
+
"metadata_file": dataset_path/'dataset_metadata.json'
|
183 |
},
|
184 |
),
|
185 |
]
|
|
|
194 |
"annotations_file": task_data_path/'in_fashion_outshop_tags_dict.json',
|
195 |
"split": "test",
|
196 |
"images_folder": self.image_folder,
|
197 |
+
"metadata_file": dataset_path/'dataset_metadata_wild.json'
|
198 |
},
|
199 |
),
|
200 |
]
|
|
|
209 |
"annotations_file": task_data_path/'in_fashion_tags_dict_train.json',
|
210 |
"split": "train",
|
211 |
"images_folder": self.image_folder,
|
212 |
+
"metadata_file": dataset_path/'dataset_metadata.json'
|
213 |
},
|
214 |
),
|
215 |
datasets.SplitGenerator(
|
|
|
221 |
"annotations_file": task_data_path/'in_fashion_tags_dict_test.json',
|
222 |
"split": "test",
|
223 |
"images_folder": self.image_folder,
|
224 |
+
"metadata_file": dataset_path/'dataset_metadata.json'
|
225 |
},
|
226 |
),
|
227 |
]
|