zju3dv / PVO

[CVPR 2023] PVO: Panoptic Visual Odometry
https://zju3dv.github.io/pvo/
209 stars 15 forks source link

IndexError: list index out of range #14

Closed 110sha closed 10 months ago

110sha commented 10 months ago

python tools/datasets/generate_dynamic_masks.py ['Scene18', 'Scene20', 'Scene06', 'Scene02', 'Scene01'] cache_path: /media/happy507/DataSpace1/sy/pvo/VO_Module/droid_slam/data_readers/cache/VKitti2.pickle Building VKitti2 dataset 0%| | 0/5 [00:00<?, ?it/s]True True True True True 100%|█████████████████████████████████████| 5/5 [00:00<00:00, 53.51it/s] Reserving datasets/Virtual_KITTI2/Scene02 for validation Reserving datasets/Virtual_KITTI2/Scene06 for validation Reserving datasets/Virtual_KITTI2/Scene18 for validation Reserving datasets/Virtual_KITTI2/Scene20 for validation Dataset vkitti2 has 445 images Segments List (Flow): [] i (Flow): 0 Segments List (Flow): [] i (Flow): 0 Segments List (Flow): [] i (Flow): 1 Segments List (Flow): [] i (Flow): 1 Segments List (Flow): [] i (Flow): 2 Traceback (most recent call last): File "tools/datasets/generate_dynamic_masks.py", line 32, in for i_batch, item in enumerate(train_loader): File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/_utils.py", line 434, in reraise raise exception IndexError: Caught IndexError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/shaying/.virtualenvs/droid/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 308, in getitem return self.datasets[dataset_idx][sample_idx] File "/media/happy507/DataSpace1/sy/pvo/VO_Module/droid_slam/data_readers/base.py", line 196, in getitem seg = self.class.segment_read(segments_list[i]) IndexError: list index out of range 在运行python tools/datasets/generate_dynamic_masks.py时报错,谁能帮帮我?

110sha commented 10 months ago

7

Go to the following file: VO_Module/droid_slam/data_readers/vkitti2.py At lines 91-92, you need to change the path for panoptic_gt_id folder. The exact replacement is: segments = sorted( glob.glob(osp.join("datasets/Virtual_KITTI2/ALL_15-deg-left", 'panoptic_gt_id/*.png')))

Hope this helps

VenkatSBitra commented 9 months ago

@110sha I am facing an issue with the installation process. I believe you have figured out the installation process. Any help would be thankful. Please find the link: https://github.com/zju3dv/PVO/issues/15#issue-2098974836