Voxelization¶
- class mmcv.ops.Voxelization(voxel_size: List, point_cloud_range: List, max_num_points: int, max_voxels: Union[tuple, int] = 20000, deterministic: bool = True)[source]¶
Convert kitti points(N, >=3) to voxels.
Please refer to Point-Voxel CNN for Efficient 3D Deep Learning for more details.
- Parameters
voxel_size (tuple or float) – The size of voxel with the shape of [3].
point_cloud_range (tuple or float) – The coordinate range of voxel with the shape of [6].
max_num_points (int) – maximum points contained in a voxel. if max_points=-1, it means using dynamic_voxelize.
max_voxels (int, optional) – maximum voxels this function create. for second, 20000 is a good choice. Users should shuffle points before call this function because max_voxels may drop points. Default: 20000.
- forward(input: torch.Tensor) → torch.Tensor[source]¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.