Update CLEVR-Sudoku.py
Browse files- CLEVR-Sudoku.py +10 -1
CLEVR-Sudoku.py
CHANGED
@@ -87,7 +87,7 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
|
|
87 |
def _split_generators(self, dl_manager):
|
88 |
|
89 |
# TODO: define image directory
|
90 |
-
|
91 |
|
92 |
# archive_path, sudokus, options, labels, attributes = self.get_data(
|
93 |
# dl_manager, self.config.data_url, self.config.image_url
|
@@ -96,6 +96,15 @@ class CLEVRSudoku(datasets.GeneratorBasedBuilder):
|
|
96 |
# Download and extract the dataset archive
|
97 |
archive_path = dl_manager.download_and_extract(self.config.data_url)
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
# unzip file
|
100 |
# import zipfile
|
101 |
# with zipfile.ZipFile(archive_path,"r") as zip_ref:
|
|
|
87 |
def _split_generators(self, dl_manager):
|
88 |
|
89 |
# TODO: define image directory
|
90 |
+
image_path = dl_manager.download_and_extract(self.config.image_url)
|
91 |
|
92 |
# archive_path, sudokus, options, labels, attributes = self.get_data(
|
93 |
# dl_manager, self.config.data_url, self.config.image_url
|
|
|
96 |
# Download and extract the dataset archive
|
97 |
archive_path = dl_manager.download_and_extract(self.config.data_url)
|
98 |
|
99 |
+
files = os.listdir(image_path)
|
100 |
+
print(files)
|
101 |
+
|
102 |
+
dirs = [d for d in os.listdir(image_path) if d != "__MACOSX"]
|
103 |
+
top_dir = dirs[0]
|
104 |
+
|
105 |
+
print(os.listdir(os.path.join(image_path, top_dir))
|
106 |
+
|
107 |
+
|
108 |
# unzip file
|
109 |
# import zipfile
|
110 |
# with zipfile.ZipFile(archive_path,"r") as zip_ref:
|