Commit
•
8fc2d4a
1
Parent(s):
22d4fc2
fix loading file
Browse files- stackmix_hkr.py +1 -3
stackmix_hkr.py
CHANGED
@@ -26,13 +26,11 @@ class StackmixHKR(datasets.GeneratorBasedBuilder):
|
|
26 |
|
27 |
data_paths = dl_manager.download(_URLS)
|
28 |
archive_paths = [data_paths[key] for key in data_paths if key.startswith("img")]
|
29 |
-
img_path = os.path.
|
30 |
-
os.makedirs(img_path, exist_ok=True)
|
31 |
|
32 |
for archive_path in archive_paths:
|
33 |
with zipfile.ZipFile(archive_path) as archive:
|
34 |
archive.extractall(img_path)
|
35 |
-
os.remove(archive_path)
|
36 |
|
37 |
image_paths = [os.path.join(img_path, img_name) for img_name in os.listdir(img_path)]
|
38 |
return [datasets.SplitGenerator(
|
|
|
26 |
|
27 |
data_paths = dl_manager.download(_URLS)
|
28 |
archive_paths = [data_paths[key] for key in data_paths if key.startswith("img")]
|
29 |
+
img_path = os.path.split(data_paths["img00"])[0]
|
|
|
30 |
|
31 |
for archive_path in archive_paths:
|
32 |
with zipfile.ZipFile(archive_path) as archive:
|
33 |
archive.extractall(img_path)
|
|
|
34 |
|
35 |
image_paths = [os.path.join(img_path, img_name) for img_name in os.listdir(img_path)]
|
36 |
return [datasets.SplitGenerator(
|