tianweiy/CenterPoint

A bug on voxelization && A TensorRT version of Centerpoint

HaohaoNJU opened this issue · 2 comments

Hi, tianwei:
Thanks for your great work, I wrote a TensorRT project to accelerate inference, the project is exactly based on configs/waymo/pp/waymo_centerpoint_pp_two_pfn_stride1_3.py. I implement the inference by TensorRT and found the mAP/mAPH metrics are better than that of the original torch model. And the reason is that, points in WAYMO Openset is permuted roughly regularly according to their 3D-locations, when we make voxelizaiton in a point-wise-for-loop way(see here), only the top20 of points will be accepted, which is a biased subsampling.
To make unbiased subsampling if there are more than 20 points belonging to this voxel, you can either shuffle the permutation of those points or make point-wise multi-threads, I choose the latter way implemented by CUDA, where whether a point will be accepted into the voxel is totally randomly, because orders of threads are random.

great works, I will add a link to your project in the readme later today.

your solution also sounds reasonable. I have a version that implements dynamic voxelization (using all points inside the pillar) through torch unique / scatter_max, that one should solve the problem but not sure how fast it is in comparison to yours

That's right, the problem only occurs when we make traditional voxelization, and dynamic voxelization will be fine ~