Bug in sample_points function in data_processor.py when training PointRCNN_iou
See original GitHub issueIn the following code:
if (num_points < len(points)):
pts_depth = np.linalg.norm(points[:, 0:3], axis=1)
pts_near_flag = pts_depth < 40.0
far_idxs_choice = np.where(pts_near_flag==0)[0]
near_idxs = np.where(pts_near_flag ==1)[0]
near_idxs_choice = np.random.choice(near_idxs, num_points - len(far_idxs_choice), replace=False)
choice = np.concatenate((near_idxs_choice, far_idxs_choice), axis=0 ) \
if(len(far_idxs_choice) >0) else near_idxs_choice
np.random.shuffle(choice)
I encounter this error when training point_rcnn_iou:
Near_idxs_choice = np.random.choice (near_idxs, num_points - len(far_idxs_choice), replace = False)
File "mtrand.pyx", line 951, in numpy.random.mtrand.RandomState.choice
ueError: negative dimensions are not allowed
This should be possibly because the length of far_idxs_choice is larger than the default number of points16384.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, it is just a hyper-parameter based on the point cloud range. Actually I am not sure whether the performance will drop if we simply simple 16384 points from the whole point cloud. This parameter aimed to balance the number of points in nearby and far away areas since the random sampling may sample much more points in the nearby area.
Thank you for the report! It is indeed a bug and I didn’t consider that situation since it is impossible in the KITTI dataset. You could submit a PR to fix it or I will find time to fix it.