maudzung / SFA3D

Super Fast and Accurate 3D Object Detection based on 3D LiDAR Point Clouds (The PyTorch implementation)
https://github.com/maudzung/Super-Fast-Accurate-3D-Object-Detection
MIT License
1.03k stars 274 forks source link

IndexError #24

Closed zwqnju closed 3 years ago

zwqnju commented 3 years ago

When I run visualization, inference, and demo scripts, there always occurs this error for some specific frame:

Original Traceback (most recent call last):
  File "/home/zwq/miniconda2/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/zwq/miniconda2/envs/pytorch/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 "/home/zwq/miniconda2/envs/pytorch/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 "/home/zwq/workspace/SFA3D/sfa/data_process/kitti_dataset.py", line 66, in __getitem__
    return self.load_img_only(index)
  File "/home/zwq/workspace/SFA3D/sfa/data_process/kitti_dataset.py", line 76, in load_img_only
    bev_map = makeBEVMap(lidarData, cnf.boundary)
  File "/home/zwq/workspace/SFA3D/sfa/data_process/kitti_bev_utils.py", line 37, in makeBEVMap
    IHD_Map[0, np.int_(PointCloud_top[:, 0]), np.int_(PointCloud_top[:, 1])] = PointCloud_top[:, 3]
IndexError: index 608 is out of bounds for axis 2 with size 608

How can I fix it?

maudzung commented 3 years ago

Thanks for reporting the bug. Please check out the latest code. I fixed it