Datasets:

Modalities:
Image
Languages:
English
ArXiv:
Libraries:
Datasets
License:
sayakpaul HF staff commited on
Commit
0c9913a
1 Parent(s): fb20c38

fix: basepath for the downloaded and extracted dataset.

Browse files
Files changed (1) hide show
  1. nyu_depth_v2.py +4 -4
nyu_depth_v2.py CHANGED
@@ -110,21 +110,21 @@ class NYUDepthV2(datasets.GeneratorBasedBuilder):
110
 
111
  def _split_generators(self, dl_manager):
112
  urls = _URLS[self.config.name]
113
- base_path = dl_manager.download_and_extract(urls)
114
 
115
  train_data_files = self._get_file_paths(
116
  os.path.join(base_path, "nyudepthv2", "train")
117
  )
118
- val_data_files = self._get_file_paths(os.path.join(base_path, "nyudepthv2" "val"))
119
 
120
  return [
121
  datasets.SplitGenerator(
122
  name=datasets.Split.TRAIN,
123
- gen_kwargs={"data": train_data_files, "split": "training"},
124
  ),
125
  datasets.SplitGenerator(
126
  name=datasets.Split.VALIDATION,
127
- gen_kwargs={"data": val_data_files, "split": "validation"},
128
  ),
129
  ]
130
 
 
110
 
111
  def _split_generators(self, dl_manager):
112
  urls = _URLS[self.config.name]
113
+ base_path = dl_manager.download_and_extract(urls)["train/val"]
114
 
115
  train_data_files = self._get_file_paths(
116
  os.path.join(base_path, "nyudepthv2", "train")
117
  )
118
+ val_data_files = self._get_file_paths(os.path.join(base_path, "nyudepthv2", "val"))
119
 
120
  return [
121
  datasets.SplitGenerator(
122
  name=datasets.Split.TRAIN,
123
+ gen_kwargs={"filepaths": train_data_files},
124
  ),
125
  datasets.SplitGenerator(
126
  name=datasets.Split.VALIDATION,
127
+ gen_kwargs={"filepaths": val_data_files},
128
  ),
129
  ]
130