Closed s2g7a03 closed 1 year ago
I guess the dataset directory (set by --dataset_root
) is not correctly specified. Since there are many types of files (shadow, shadow-free, mask). Please refer datasets#file-organization and strictly follow the instruction. If it doesn't solve your situation. Let me know (with some detailed info. on execution, such as where the script is launched)
Thank you! Hmm.. I had tried some typical mistakes but did not reproduce the errors above. Could you attach the entire log (in a single file) and show the actual commands to launch the train.py?
Have you downloaded our SynShadow dataset as instructed?
Just clicking the link may not 'work' but you might copy the link address. I can download it now by
wget http://www.hal.t.u-tokyo.ac.jp/~inoue/projects/synthetic_shadow/SynShadow.zip
If this or alternative commands do not work, let me know
Traceback (most recent call last): File "train.py", line 29, in
for i, data_i in enumerate(dataloader, start=iter_counter.epoch_iter):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/usr/local/lib/python3.8/dist-packages/torch/_utils.py", line 543, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/SynShadow/src/data/synth_dataset.py", line 44, in getitem
mask_index = next(self.mask_iter)
File "/content/SynShadow/src/data/util.py", line 9, in InfiniteSampler
yield order[i]
IndexError: index -1 is out of bounds for axis 0 with size 0