valeoai / WaffleIron

Other
39 stars 6 forks source link

About instance mixing enhancement #8

Closed horizonfly99 closed 2 months ago

horizonfly99 commented 3 months ago

Original Traceback (most recent call last): File "/home/hhw/.conda/envs/RegTR/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/hhw/.conda/envs/RegTR/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 "/home/hhw/.conda/envs/RegTR/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 "/home/hhw/segmetation/WaffleIron/datasets/pc_dataset.py", line 157, in getitem pc_orig, labels_orig, filename = self.load_pc(index) File "/home/hhw/segmetation/WaffleIron/datasets/semantic_kitti.py", line 307, in load_pc pc, labels = self.polarmix(pc, labels, new_pc, new_label) File "/home/hhw/segmetation/WaffleIron/datasets/semantic_kitti.py", line 170, in call pc1, label1 = pc1[where1], label1[where1] IndexError: boolean index did not match indexed array along dimension 0; dimension is 123870 but corresponding boolean dimension is 24576

horizonfly99 commented 2 months ago

How can the issue mentioned above be resolved? Thank you!

gpuy commented 2 months ago

Dear @horizonfly99,

The most probable is that one augmentation was applied on pc1 but then not applied correctly on label1. You should have: len(pc1) == len(label1) and len(pc1)==len(where1).

Nevertheless, I am not having such issue on my side. Can you restart from a fresh git clone of this repo and restart a training? Let me know how it goes.

Cheers,

Gilles

horizonfly99 commented 2 months ago

@gpuy Thank you very much, I have copied your project code again, and now it works!