Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TorchSparse/SparseConv3d models #8

Open
CCInc opened this issue Nov 10, 2022 · 0 comments
Open

Add TorchSparse/SparseConv3d models #8

CCInc opened this issue Nov 10, 2022 · 0 comments
Assignees
Labels
model Issues pretaining to Models

Comments

@CCInc
Copy link
Owner

CCInc commented Nov 10, 2022

This adds additional complexity due to the collation of the datasets. OpenPoints datasets are batched "densely", i.e. 16 batches of data in the shape [2048, 3] are batched into a single tensor of shape [16, 2048, 3] (implemented based on the original TP3D code here

def from_data_list(data_list):
). Some models/backends, such as sparse convolutions, require the data to be batched differently, i.e. into a shape of [2048*16, 4], where the 4th column is a "batch index". This can be done by using the pytorch geometric collation functions (https://pytorch-geometric.readthedocs.io/en/latest/modules/data.html#torch_geometric.data.Batch.from_data_list), which collate in this manner by default.

TorchPoints accomplishes this by setting a configuration option in the model to define whether it uses "dense" or "sparse" data. We would likely need to do the same, and have the dataloader batch according to this configuration option. Ref: https://github.com/torch-points3d/torch-points3d/blob/66e8bf22b2d98adca804c753ac3f0013ff4ec731/torch_points3d/datasets/base_dataset.py#L160-L174

@CCInc CCInc self-assigned this Nov 18, 2022
@CCInc CCInc added the model Issues pretaining to Models label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model Issues pretaining to Models
Projects
None yet
Development

No branches or pull requests

1 participant