Skip to content

Commit 6b9ec66

Browse files
committed
update version
1 parent c14a563 commit 6b9ec66

3 files changed

Lines changed: 48 additions & 4 deletions

File tree

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<img src="./pointnet.jpg" width="1200px"></img>
22

3+
[![PyPI version](https://badge.fury.io/py/pointnet.svg)](https://badge.fury.io/py/pointnet)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
36
# pointnet
47

5-
A pytorch implementation of PointNet
8+
A pytorch implementation of PointNet and PointNet++.
69

710
## Installation
811

@@ -18,6 +21,7 @@ pip install pointnet -i https://pypi.org/simple
1821

1922
## Usage
2023

24+
### PointNet
2125
Perform classification with inputs xyz coordinates:
2226

2327
```python
@@ -44,6 +48,36 @@ x = torch.cat([xyz, other_feats], dim=1)
4448
logits = model(x)
4549
```
4650

51+
Perform semantic segmentation:
52+
53+
```python
54+
import torch
55+
from pointnet import PointNetSeg
56+
57+
model = PointNetSeg(3, 40)
58+
x = torch.randn(16, 3, 1024)
59+
logits = model(x)
60+
```
61+
62+
### PointNet2
63+
PointNet2 uses [taichi](https://github.com/taichi-dev/taichi) to accelerate the computation of ball query. You need to
64+
initialize taichi before using PointNet2.
65+
66+
Perform classification with inputs xyz coordinates:
67+
68+
```python
69+
import torch
70+
from pointnet import PointNet2SSGCls
71+
72+
import taichi as ti
73+
ti.init(arch=ti.cuda)
74+
75+
model = PointNet2SSGCls(in_dim=3, out_dim=40).cuda()
76+
x = torch.randn(16, 3, 1024).cuda()
77+
logits = model(x)
78+
```
79+
80+
4781

4882
## Performance
4983
Classification accuracy on ModelNet40 dataset (2048 points, see [modelnet40_experiments](
@@ -71,3 +105,13 @@ https://github.com/kentechx/modelnet40_experiments) for details):
71105
year={2017}
72106
}
73107
```
108+
109+
```bibtex
110+
@article{qi2017pointnet++,
111+
title={Pointnet++: Deep hierarchical feature learning on point sets in a metric space},
112+
author={Qi, Charles Ruizhongtai and Yi, Li and Su, Hao and Guibas, Leonidas J},
113+
journal={Advances in neural information processing systems},
114+
volume={30},
115+
year={2017}
116+
}
117+
```

pointnet/pointnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def forward(self, x):
6363
class PointNetCls(nn.Module):
6464
def __init__(
6565
self,
66-
*,
6766
in_dim,
6867
out_dim,
68+
*,
6969
stn_3d=STN(in_dim=3), # if None, no stn_3d
7070
with_head=True,
7171
head_norm=True,
@@ -141,9 +141,9 @@ class PointNetSeg(nn.Module):
141141

142142
def __init__(
143143
self,
144-
*,
145144
in_dim,
146145
out_dim,
146+
*,
147147
stn_3d=STN(in_dim=3), # if None, no stn_3d
148148
global_head_norm=True, # if using normalization in the global head, disable it if batch size is 1
149149
):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name='pointnet',
55
packages=find_packages(),
6-
version='0.0.1',
6+
version='0.0.2',
77
license='MIT',
88
description='PointNet - Pytorch',
99
author='Kaidi Shen',

0 commit comments

Comments
 (0)