mit-han-lab / torchsparse

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.
https://torchsparse.mit.edu
MIT License
1.17k stars 138 forks source link

Question about voxelization (spvoxelize) #316

Open sIHURs opened 1 month ago

sIHURs commented 1 month ago

Hi~

I'm just starting to learn some deep learning concepts for point clouds. I have a project that requires voxelization as an operation, and I need to incorporate voxelization as a layer in a PyTorch model.

I noticed that TorchSparse has a method torchsparse.nn.functional.spvoxelize that seems very similar to the voxelization module in PVCNN. The TorchSparse wiki does not provide information about the counts parameter, I'm not sure what it is.

The question is, if I have coords, feats, and resolution, how can I use spvoxelize to get a voxelized output with the shape (b, c, resolution, resolution, resolution)?

thanks very much yifan