SCNU-RISLAB / MF-MOS

This repo is the offical PyTorch implementation of MF-MOS.
GNU General Public License v3.0
42 stars 4 forks source link

Missmatch at preprocessing #2

Open Zero-Yi opened 2 months ago

Zero-Yi commented 2 months ago

Hi,

I try to reproduce your result by first running auto_gen_residual_images_mp.py. And I get this:

.
|-- 00
|   |-- calib.txt
|   |-- labels
|   |-- poses.txt
|   |-- residual_images_1
|   |-- residual_images_10
|   |-- residual_images_12
|   |-- residual_images_14
|   |-- residual_images_15
|   |-- residual_images_16
|   |-- residual_images_18
|   |-- residual_images_2
|   |-- residual_images_21
|   |-- residual_images_24
|   |-- residual_images_3
|   |-- residual_images_4
|   |-- residual_images_5
|   |-- residual_images_6
|   |-- residual_images_7
|   |-- residual_images_8
|   |-- residual_images_9
|   |-- times.txt
|   `-- velodyne
...

This is DIFFERENT from the structure in README.md:

DATAROOT
└── sequences
    ├── 00
    │   ├── poses.txt
    │   ├── calib.txt
    │   ├── times.txt
    │   ├── labels
    │   ├── residual_images_1
    │   ├── residual_images_10
    │   ├── residual_images_11
    │   ├── residual_images_13
    │   ├── residual_images_15
    │   ├── residual_images_16
    │   ├── residual_images_19
    │   ├── residual_images_2
    │   ├── residual_images_22
    │   ├── residual_images_3
    │   ├── residual_images_4
    │   ├── residual_images_5
    │   ├── residual_images_6
    │   ├── residual_images_7
    │   ├── residual_images_8
    │   ├── residual_images_9
    │   └── velodyne
   ...

Most important is, I get error when I further run bash script/valid.sh:

    user.infer()
  File "/workspaces/test_reproduce/MF-MOS/modules/user_refine.py", line 38, in infer
    coarse=coarse, reproj=reproj, refine=refine)
  File "/workspaces/test_reproduce/MF-MOS/modules/user_refine.py", line 84, in infer_subset
    in enumerate(tqdm(loader, ncols=80)):
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/tqdm/std.py", line 1178, in __iter__
    for obj in iterable:
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
    data = self._next_data()
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
    return self._process_data(data)
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
    data.reraise()
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise
    raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
    data = fetcher.fetch(index)
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/envs/mfmos/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File ".//common/dataset/kitti/parser.py", line 280, in __getitem__
    exec("residual_file_" + str(i+1) + " = " + "self.residual_files_" + str(i+1) + "[seq][index]")
  File "<string>", line 1, in <module>
IndexError: list index out of range

I think this is from the missmatch of the name of the residual image folders, because I then realized it asks for residual_files_13 which is not there.

Please have a look into this issue. Thanks!

Terminal-K commented 2 months ago

Hi @Zero-Yi, I'm sorry for replying so late! The loop in L161 of this file was written incorrectly due to carelessness while organizing the code. It has now been corrected, and I hope it helps you. https://github.com/SCNU-RISLAB/MF-MOS/blob/4026baee57440931512efdd6c2f79d24d99df63f/utils/auto_gen_residual_images_mp.py#L160-L163