Skip to content

Commit

Permalink
Merge pull request #118 from xindeng98/master
Browse files Browse the repository at this point in the history
add PointVector
  • Loading branch information
guochengqian committed Aug 17, 2023
2 parents de9e7f1 + 1e65906 commit 0cfa000
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 4 deletions.
35 changes: 35 additions & 0 deletions cfgs/modelnet40ply2048/pointvector-s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


model:
NAME: BaseCls
encoder_args:
NAME: PointVectorEncoder
blocks: [1, 1, 1, 1, 1, 1]
strides: [1, 2, 2, 2, 2, 1]
width: 32
in_channels: 3
radius: 0.15
radius_scaling: 1.5
sa_layers: 2
sa_use_res: True
nsample: 32
expansion: 4
flag: 0
aggr_args:
feature_type: 'dp_fj'
reduction: 'max'
group_args:
NAME: 'ballquery'
normalize_dp: True
conv_args:
order: conv-norm-act
act_args:
act: 'relu'
norm_args:
norm: 'bn'
cls_args:
NAME: ClsHead
num_classes: 40
mlps: [512, 256]
norm_args:
norm: 'bn1d'
37 changes: 37 additions & 0 deletions cfgs/s3dis/pointvector-l.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

model:
NAME: BaseSeg
encoder_args:
NAME: PointVectorEncoder
blocks: [1, 3, 5, 3, 3]
strides: [1, 4, 4, 4, 4]
sa_layers: 1
sa_use_res: False
width: 32
in_channels: 4
expansion: 4
radius: 0.1
nsample: 32
flag: 1 #means s3dis
aggr_args:
feature_type: 'dp_fj'
reduction: 'max'
group_args:
NAME: 'ballquery'
normalize_dp: True
conv_args:
order: conv-norm-act
act_args:
act: 'relu'
norm_args:
norm: 'bn'
decoder_args:
NAME: PointVectorDecoder
cls_args:
NAME: SegHead
num_classes: 13
in_channels: null
norm_args:
norm: 'bn'

batch_size: 8
37 changes: 37 additions & 0 deletions cfgs/s3dis/pointvector-xl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

model:
NAME: BaseSeg
encoder_args:
NAME: PointVectorEncoder
blocks: [1, 4, 7, 4, 4]
strides: [1, 4, 4, 4, 4]
sa_layers: 1
sa_use_res: False
width: 64
in_channels: 4
expansion: 4
radius: 0.1
nsample: 32
flag: 1 #means s3dis
aggr_args:
feature_type: 'dp_fj'
reduction: 'max'
group_args:
NAME: 'ballquery'
normalize_dp: True
conv_args:
order: conv-norm-act
act_args:
act: 'relu'
norm_args:
norm: 'bn'
decoder_args:
NAME: PointVectorDecoder
cls_args:
NAME: SegHead
num_classes: 13
in_channels: null
norm_args:
norm: 'bn'

batch_size: 8
34 changes: 34 additions & 0 deletions cfgs/scanobjectnn/pointvector-s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

model:
NAME: BaseCls
encoder_args:
NAME: PointVectorEncoder
blocks: [1, 1, 1, 1, 1, 1]
strides: [1, 2, 2, 2, 2, 1]
width: 32
in_channels: 4
sa_layers: 2
sa_use_res: True
radius: 0.15
radius_scaling: 1.5
nsample: 32
expansion: 4
flag: 0 # means classification task
aggr_args:
feature_type: 'dp_fj'
reduction: 'max'
group_args:
NAME: 'ballquery'
normalize_dp: True
conv_args:
order: conv-norm-act
act_args:
act: 'leakyrelu'
norm_args:
norm: 'bn'
cls_args:
NAME: ClsHead
num_classes: 15
mlps: [512, 256]
norm_args:
norm: 'bn1d'
68 changes: 68 additions & 0 deletions cfgs/shapenetpart/pointvector-s_c64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

model:
NAME: BasePartSeg
encoder_args:
NAME: PointVectorEncoder
blocks: [ 1, 1, 1, 1, 1 ] # 1, 1, 1, 2, 1 is better, but not the main focus of this paper
strides: [ 1, 2, 2, 2, 2 ]
width: 64
in_channels: 7 # better than 4,6
sa_layers: 2 # better than 2
sa_use_res: True
radius: 0.1
radius_scaling: 2.5
nsample: 32 # will not improve performance.
expansion: 4
flag: 2 # means partseg
aggr_args:
feature_type: 'dp_fj'
reduction: 'max'
group_args:
NAME: 'ballquery'
normalize_dp: True
conv_args:
order: conv-norm-act
act_args:
act: 'relu' # leakrelu makes training unstable.
norm_args:
norm: 'bn' # ln makes training unstable
decoder_args:
NAME: PointVectorPartDecoder
cls_map: curvenet
cls_args:
NAME: SegHead
global_feat: max,avg # apped global feature to each point feature
num_classes: 50
in_channels: null
norm_args:
norm: 'bn'


# ---------------------------------------------------------------------------- #
# Training cfgs
# ---------------------------------------------------------------------------- #
lr: 0.001
min_lr: null
optimizer:
NAME: adamw
weight_decay: 1.0e-4 # the best

criterion_args:
NAME: Poly1FocalLoss

# scheduler
epochs: 300
sched: multistep
decay_epochs: [210, 270]
decay_rate: 0.1
warmup_epochs: 0

datatransforms:
train: [PointsToTensor, PointCloudScaling,PointCloudCenterAndNormalize,PointCloudJitter,ChromaticDropGPU]
val: [PointsToTensor, PointCloudCenterAndNormalize]
kwargs:
jitter_sigma: 0.001
jitter_clip: 0.005
scale: [0.8, 1.2]
gravity_dim: 1
angle: [0, 1.0, 0]
10 changes: 7 additions & 3 deletions docs/modelzoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Throughput is measured with 128 x 1024 points.
| PointNet++ | 77.9 / 75.4 | [86.2 / 84.4](https://drive.google.com/drive/folders/1T7uvQW4cLp65DnaEWH9eREH4XKTKnmks?usp=sharing) | 1.5M | 1.7G | 1872 |
| **PointNeXt-S** |87.7±0.4 / 85.8±0.6 | [88.20 / 86.84](https://drive.google.com/drive/folders/1A584C9x5uAqppbjNNiVqlA_7uOOOlEII?usp=sharing) | 1.4M | 1.64G | 2040 |
| **Pix4Point** |87.9 / 86.7 | [87.9 / 86.7 ](https://drive.google.com/drive/folders/1VyAWEYZF-nXIp0zIuCqnpFYwVmJjHihR?usp=share_link) | 22.6M | 28.0G | - |

| **PointVector**|87.8±0.4 / 86.2±0.5 | [88.17 / 86.69](https://drive.google.com/drive/folders/1Bxbf7MO_uK-28IWYRe1pWmILenDeL7Xk?usp=sharing) | 1.55 | - | 901 |


### S3IDS (6-fold) Segmentation
Expand All @@ -30,7 +30,8 @@ Throughput (TP) is measured with 16 x 15000 points.
| **PointNeXt-B** | 71.5 / 88.8 / 80.2 | [71.5 / 88.8 / 80.2](https://drive.google.com/drive/folders/1UJj-tvexA74DYSFpNYdPRmMznJ1-tjTO?usp=sharing) | 3.8M | 8.8G | 158 |
| **PointNeXt-L** | 73.9 / 89.8 / 82.2 | [73.9 / 89.8 / 82.2](https://drive.google.com/drive/folders/1VhL1klLDgRVx1O1PN4XN64S3BYkRvmkV?usp=sharing) | 7.1M | 15.2G | 115 |
| **PointNeXt-XL** | 74.9 / 90.3 / 83.0 | [74.9 / 90.3 / 83.0](https://drive.google.com/drive/folders/19n7jmB7NNKiIL_jb3Wq3hY-CQDx23q7u?usp=sharing) | 41.6M | 84.8G | 46 |

| **PointVector-L** | 77.4 / 91.4 / 85.5 | [77.4 / 91.4 / 85.5](https://drive.google.com/drive/folders/1zpkUwawIbKf9mFsyKbFoAYere0AiCFmJ?usp=sharing) | 4.2M | 10.7G | 98 |
| **PointVector-XL** | 78.4 / 91.9 / 86.1 | [78.4 / 91.9 / 86.1](https://drive.google.com/drive/folders/1-iIrZtE_CNaUDPPm1MMkLhmsYtb3Fdf0?usp=sharing) | 24.1M | 58.5G | 40 |


### S3DIS (Area 5) Segmentation
Expand All @@ -47,7 +48,8 @@ Throughput (TP) is measured with 16 x 15000 points.
| **PointNeXt-L** | 69.0±0.5 / 90.0±0.1 / 75.3±0.8 | [69.3 / 90.1 / 75.7](https://drive.google.com/drive/folders/1g4qE6g10zoZY5y6LPDQ5g12DvSLbnCnj?usp=sharing) | 7.1M | 15.2G | 115 |
| **PointNeXt-XL** | 70.5±0.3 / 90.6±0.2 / 76.8±0.7 | [71.1 / 91.0 / 77.2](https://drive.google.com/drive/folders/1rng7YmfzzIGtXREn7jW0vVFmSSakLQs4?usp=sharing) | 41.6M | 84.8G | 46 |
| **Pix4Point** | 69.6 / 89.9 / 75.2 | [69.6 / 89.9 / 75.2](https://drive.google.com/drive/folders/1WaJwwWRmv_XtApYKuslPw-hkK0EHvnaE?usp=share_link) | 23.7M | 190G | - |

| **PointVector-L** | 71.2 / 90.8 / 77.3 | [71.2 / 90.8 / 77.3](https://drive.google.com/drive/folders/1w3krP8p_OGpWETwK4ynA3XM4QShKloQW?usp=sharing) | - | - | - |
| **PointVector-XL** | 72.3 / 91.0 / 78.1 | [72.61 / 91.59 / 78.3](https://drive.google.com/drive/folders/1qaojo6G8S1L1UTl8ZBVIl-qYXwm5od2U?usp=sharing) | 24.1M | 58.5G | 40 |

### ShapeNetpart Part Segmentation

Expand All @@ -60,6 +62,7 @@ Throughput (TP) is measured with 64*2048 points.
| **PointNeXt-S (C=64)** | 86.9±0.0 / 84.8±0.5 | [86.9 / 85.2](https://drive.google.com/drive/u/1/folders/1qGue_R313Ej9xa_VaQGrFHiHoVdD8e8A?usp=sharing) |
| **PointNeXt-S (C=160)** | 87.0±0.1 / 85.2±0.1 | [87.1 / 85.4](https://drive.google.com/drive/u/1/folders/1hYxwuAMXo2HRtqEYe0_frjcVD8JDecb6?usp=sharing) |
| **Pix4Point** | 86.8 / 85.6 | [86.8 / 85.6](https://drive.google.com/drive/folders/1cHW8phXBB-eOohZ04iUpbo1ulAE2qQkQ?usp=share_link) |
| **PointVector-S (C=64)** | 86.9 / - | [86.9 / 85.05](https://drive.google.com/drive/folders/1gu7FUoI6HOaWbWk9VttcR469Fn98O7D_?usp=sharing) |



Expand All @@ -69,3 +72,4 @@ Throughput (TP) is measured with 64*2048 points.
|:---:|:---:|:---:|:---:| :---:|:---:|
| PointNet++ | 91.9 / - | [93.0 / 90.7](https://drive.google.com/drive/folders/1Re2_NCtZBKxIhtv755LlnHjz-FBPWjgW?usp=sharing) | 1.5M | 1.7G | 1872 |
| **PointNeXt-S** (C=64) | 93.7±0.3 / 90.9±0.5 | [94.0 / 91.1](https://drive.google.com/drive/folders/14biOHuvH8b2F03ZozrWyF45tCmtsorYN?usp=sharing) | 4.5M | 6.5G | 2033 |
| **PointVector-S** (C=64) | 93.5±0.2 / 91.0±0.5 | [93.68 / 91.53](https://drive.google.com/drive/folders/1I_Xv4o8GdQKaNeEcHTW6e0ZjchuxHjlT?usp=sharing) | - | - | - |
Binary file added docs/projects/misc/pointvector/pointvector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/projects/misc/pointvector/s3dis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions docs/projects/pointvector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## PointVector: A Vector Representation In Point Cloud Analysis

*by [Xin Deng](https://xindeng98.github.io/), [WenYu Zhang](https://wenyu1009.github.io/), [Qing Ding](https://sse.ustc.edu.cn/2020/0422/c19861a418817/page.htm), [XinMing Zhang](http://staff.ustc.edu.cn/~xinming/)*
<p align="center">
<img src="./misc/pointvector/pointvector.png" width=100% height=100% class="center">
</p>



---
### [arXiv](https://arxiv.org/pdf/2205.10528.pdf)

### News
- :boom: March, 2023: [**PointVector**](https://arxiv.org/pdf/2205.10528.pdf) accepted by CVPR'23


### Abstract

In point cloud analysis, point-based methods have rapidly developed in recent years. These methods have recently focused on concise MLP structures, such as PointNeXt, which have demonstrated competitiveness with Convolutional and Transformer structures. However, standard MLPs are limited in their ability to extract local features effectively. To address this limitation, we propose a Vector-oriented Point Set Abstraction that can aggregate neighboring features through higher-dimensional vectors. To facilitate network optimization, we construct a transformation from scalar to vector using independent angles based on 3D vector rotations. Finally, we develop a PointVector model that follows the structure of PointNeXt. Our experimental results demonstrate that PointVector achieves state-of-the-art performance $\textbf{72.3\% mIOU}$ on the S3DIS Area 5 and $\textbf{78.4\% mIOU}$ on the S3DIS (6-fold cross-validation) with only $\textbf{58\%}$ model parameters of PointNeXt. We hope our work will help the exploration of concise and effective feature representations. The code will be released soon.

### Note
Since there is a small difference in the model code used in different datasets, mainly in the use of batchnorm and leakyrelu and relu, we have integrated it. However, some of the experiments fluctuated a lot, so we did not run them more than once, but at the same time put the original code into the checkpoint link, which is the pointvector.py in the folder, and in fact the original network structure is equivalent to our existing code.

The modelnet40c showed a small difference, but it was acceptable.
### Visualization
More examples are available in the [paper](https://arxiv.org/pdf/2205.10528.pdf).

![s3dis](./misc/pointvector/s3dis.png)


---

### Citation
If you find PointVector useful, please cite:
```tex
@misc{deng2023pointvector,
title={PointVector: A Vector Representation In Point Cloud Analysis},
author={Xin Deng and WenYu Zhang and Qing Ding and XinMing Zhang},
year={2023},
eprint={2205.10528},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```
2 changes: 1 addition & 1 deletion openpoints

0 comments on commit 0cfa000

Please sign in to comment.