pointnext

PointNext - Pytorch


Keywords
3D, segmentation, classification, point, cloud, understanding, pointnet2, pointnext
License
MIT
Install
pip install pointnext==0.0.5

Documentation

PyPI version License: MIT

pointnext

Pytorch implementation of PointNext.

Installation

pip install pointnext

This will compile the CUDA operators. Please make sure that the CUDA version is compatible with your Pytorch version.

Usage

Classification

import torch
from pointnext import PointNext, PointNextDecoder, pointnext_s

encoder = pointnext_s(in_dim=3)
model = PointNext(40, encoder=encoder).cuda()
x = torch.randn(2, 3, 1024).cuda()
xyz = torch.randn(2, 3, 1024).cuda()
out = model(x, xyz)

Semantic segmentation

import torch
from pointnext import PointNext, PointNextDecoder, pointnext_s

encoder = pointnext_s(in_dim=3)
model = PointNext(40, encoder=encoder, decoder=PointNextDecoder(encoder_dims=encoder.encoder_dims)).cuda()
x = torch.randn(2, 3, 1024).cuda()
xyz = torch.randn(2, 3, 1024).cuda()
out = model(x, xyz)

Part segmentation

import torch
from pointnext import PointNext, PointNextDecoder, pointnext_s

encoder = pointnext_s(in_dim=3)
model = PointNext(40, encoder=encoder, decoder=PointNextDecoder(encoder_dims=encoder.encoder_dims),
                  n_category=16).cuda()
x = torch.randn(2, 3, 1024).cuda()
xyz = torch.randn(2, 3, 1024).cuda()
category = torch.randint(0, 16, (2,)).cuda()
out = model(x, xyz, category)

Reference

@InProceedings{qian2022pointnext,
  title   = {PointNeXt: Revisiting PointNet++ with Improved Training and Scaling Strategies},
  author  = {Qian, Guocheng and Li, Yuchen and Peng, Houwen and Mai, Jinjie and Hammoud, Hasan and Elhoseiny, Mohamed and Ghanem, Bernard},
  booktitle=Advances in Neural Information Processing Systems (NeurIPS),
  year    = {2022},
}