tom-roddick / mono-semantic-maps

Other
314 stars 67 forks source link

KeyError when train argoverse dataset #14

Open XinnWang opened 2 years ago

XinnWang commented 2 years ago

Hi, thanks for the great work! I want to train this model on argoverse dataset, got following error:

=== Beginning epoch 1 of 200 ===
  0%|                                                                                                                                                | 0/50000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/media/new_data3/mono-semantic-maps-master/train.py", line 340, in <module>
    main()
  File "/media/new_data3/mono-semantic-maps-master/train.py", line 316, in main
    train(train_loader, model, criterion, optimiser, summary, config, epoch)
  File "/media/new_data3/mono-semantic-maps-master/train.py", line 34, in train
    for i, batch in enumerate(tqdm(dataloader)):
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/tqdm/std.py", line 1180, in __iter__
    for obj in iterable:
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/_utils.py", line 434, in reraise
    raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/media/new_data3/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/media/new_data3/mono-semantic-maps-master/src/data/augmentation.py", line 14, in __getitem__
    image, calib, labels, mask = self.dataset[index]
  File "/media/new_data3/mono-semantic-maps-master/src/data/argoverse/dataset.py", line 59, in __getitem__
    split, log, camera = self.examples[timestamp]
KeyError: 30314

It seems like examples are indexed by timestamp inside argoverse, which can not index by normal numbers. How can i fix this issue? Thanks.

My env is:

python 3.9.7
1.10.2+cu113
laozheng1 commented 2 years ago

Have you solved the problem yet? I'm also running this project with this data set. If so, can we talk about it?

laozheng1 commented 2 years ago

=== Beginning epoch 1 of 200 === 0%| | 0/4167 [00:00<?, ?it/s] Traceback (most recent call last): File "train.py", line 339, in main() File "train.py", line 315, in main train(train_loader, model, criterion, optimiser, summary, config, epoch) File "train.py", line 33, in train for i, batch in enumerate(tqdm(dataloader)): File "/root/miniconda3/lib/python3.8/site-packages/tqdm/std.py", line 1185, in iter for obj in iterable: File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) KeyError: Caught KeyError in DataLoader worker process 0. Original Traceback (most recent call last): File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/autodl-tmp/argoverse-api/mono-semantic-maps/src/data/augmentation.py", line 14, in getitem image, calib, labels, mask = self.dataset[index] File "/root/autodl-tmp/argoverse-api/mono-semantic-maps/src/data/argoverse/dataset.py", line 59, in getitem split, log, camera = self.examples[timestamp] KeyError: 46293

XinnWang commented 2 years ago

no, i give up this dataset...