MCG-NJU / CamLiFlow

[CVPR 2022 Oral & TPAMI 2023] Learning Optical Flow and Scene Flow with Bidirectional Camera-LiDAR Fusion

Home Page:https://arxiv.org/abs/2303.12017

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when loading FlyingThings3D

ZhangYushan3 opened this issue · comments

Hi, thanks for the nice work. But I got the following error when loading the FlyingThings3D subset after preprocessing. I've checked that the pcs actually are 0 length. Do you have any idea why I got this error and how to fix it? Thanks.

Traceback (most recent call last):
File "main.py", line 554, in
main(args)
File "main.py", line 301, in main
for i, sample in enumerate(train_loader):
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/_utils.py", line 543, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/miniconda3/envs/sceneflow/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mimer/NOBACKUP/groups/alvis_cvl/yushanz/scene_flow/sceneflow/dataloader/flyingthings3d.py", line 65, in getitem
indices2 = np.random.choice(pc2.shape[0], size=self.n_points, replace=pc2.shape[0] < self.n_points)
File "mtrand.pyx", line 909, in numpy.random.mtrand.RandomState.choice
ValueError: a must be greater than 0 unless no samples are taken

It looks strange. Can you check the depth range of the point clouds?

Thanks. I did something wrong in the augmentation. Now it's fixed.