Point Transformer V2: Grouped Vector Attention and Partition-based Pooling
Abstract
As a pioneering work exploring transformer architecture for 3D point cloud understanding, Point Transformer achieves impressive results on multiple highly competitive benchmarks.
In this work, we analyze the limitations of the Point Transformer and propose our powerful and efficient Point Transformer V2 model with novel designs that overcome the limitations of previous work.
In particular, we first propose group vector attention, which is more effective than the previous version of vector attention.
Inheriting the advantages of both learnable weight encoding and multi-head attention, we present a highly effective implementation of grouped vector attention with a novel grouped weight encoding layer.
We also strengthen the position information for attention by an additional position encoding multiplier.
Furthermore, we design novel and lightweight partition-based pooling methods which enable better spatial alignment and more efficient sampling.
Extensive experiments show that our model achieves better performance than its predecessor and achieves state-of-the-art on several challenging 3D point cloud understanding benchmarks, including 3D point cloud segmentation on ScanNet v2 and S3DIS and 3D point cloud classification on ModelNet40.
Our code will be available at https://github.com/Gofinge/PointTransformerV2 .
Introduction
Point Transformer (PTv1) [1] introduces the self-attention networks to 3D point cloud understanding.
Combining the vector attention [2] with a U-Net style encoder-decoder framework, PTv1 achieves remarkable performance in several 3D point cloud recognition tasks, including shape classification, object part segmentation and semantic scene segmentation.
In this work we analyze the limitations of Point Transformer (PTv1) [1] and propose a new elegant and powerful backbone named Point Transformer V2 (PTv2).
Our PTv2 improves upon PTv1 with several novel designs, including the advanced grouped vector attention with improved position encoding, and the efficient partition-based pooling scheme.
The vector attention layers in PTv1 utilize MLPs as the weight encoding to map the subtraction relation of query and key into an attention weight vector that can modulate the individual channels of the value vector.
However, as the model goes deeper and the number of channels increases, the number of weight encoding parameters also increases drastically, leading to severe overfitting and limiting the model depth.
To address this problem, we present grouped vector attention with a more parameter-efficient formulation, where the vector attention is divided into groups with shared vector attention weights.
Meanwhile, we show that the well-known multi-head attention [3] and the vector attention [2, 1] are degenerate cases of our proposed grouped vector attention.
Our proposed grouped vector attention inherits the merits of both vector attention and multi-head attention while being more efficient and powerful.
Furthermore, point positions provide important geometric information for 3D semantic understanding.
Hence, the positional relationship among 3D points is more critical than 2D pixels.
However, previous 3D position encoding schemes mostly follow the 2D ones and do not fully exploit the geometric knowledge in 3D coordinates.
To this end, we strengthen the position encoding mechanism by applying an additional position encoding multiplier to the relation vector.
Such a design strengthens the positional relationship information in the model, and we validate its effectiveness in our experiments.
Moreover, it is worth noting that the irregular, non-uniform spatial distributions of points are significant challenges to the pooling modules for point cloud processing.
Previous point cloud pooling approaches rely on a combination of sampling methods (e.g. farthest point sampling [4] or grid sampling [5]) and neighbor query methods (e.g. kNN or radius query), which is time-consuming and not spatially well-aligned.
To overcome this problem, we go beyond the pooling paradigm of combining sampling and query, and divide the point cloud into non-overlapping clusters to directly fuse points within the same cluster. We use uniform grids as partition divider and achieve significant improvement.
In conclusion, we propose Point Transformer V2, which improves Point Transformer [1] from several perspectives:
• We propose an effective grouped vector attention (GVA) with a novel weight encoding layer that enables efficient information exchange within and among attention groups.
• We introduce an improved position encoding scheme to utilize point cloud coordinates better and further enhance the spatial reasoning ability of the model.
• We design the partition-based pooling strategy to enable more efficient and spatially betteraligned information aggregation compared to previous methods.
We conducted extensive analysis and controlled experiments to validate our designs.
Our results indicate that PTv2 outperforms predecessor works and sets the new state-of-the-art on various 3D understanding tasks.
Related Works
Image transformers.
With the great success of ViT [6], the absolute dominance of convolution in vision tasks is shaken by Vision Transformer, which becomes a trend in 2D image understanding [7, 8, 9, 10].
ViT introduces the far-reaching scaled dot-product self-attention and multi-head self-attention theory [3] in NLP into vision by considering image patches as tokens.
However, operating global attention on the entire image consumes excessive memory.
To solve the memory consumption problem, Swin Transformer [7] introduces the grid-based local attention mechanism to operate the transformer block in a sequence of shifted windows.
Point cloud understanding.
Learning-based methods for processing 3D point clouds can be classified into the following types: projection-based, voxel-based, and point-based networks.
An intuitive way to process irregular inputs like point clouds is to transform irregular representations into regular ones.
Projection-based methods project 3D point clouds into various image planes and utilize 2D CNNbased backbones to extract feature representations [11, 12, 13, 14].
An alternative approach operates convolutions in 3D by transforming irregular point clouds into regular voxel representations [15, 16].
Those voxel-based methods suffer from inefficiency because of the sparsity of point clouds until the introduction and implementation of sparse convolution [17, 18].
Point-based methods extract features directly from the point cloud rather than projecting or quantizing irregular point clouds onto regular grids in 2D or 3D [19, 4, 20, 5].
The recently proposed transformer-based point cloud understanding approaches, introduced in the next paragraph, are also categorized into point-based methods.
Point cloud transformers.
Transformer-based networks belong to the category of point-based networks for point cloud understanding.
During the research upsurge of vision transformers, at almost the same period, Zhao et al.
[1] and Guo et al.
[21] published their explorations of applying attention to point cloud understanding, becoming pioneers in this direction.
The PCT [21] proposed by Guo et al.
performs global attention directly on the point cloud.
Their work, similar to ViT, is limited by memory consumption and computational complexity.
Meanwhile, based on the vector attention theory proposed in SAN [2], Point Transformer [1] proposed by Zhao et al.
directly performs local attention between each point and its adjacent points, which alleviated the memory problem mentioned
Unpooling
U !
U " U " U ! γ
U "
U #
MLP Δ𝑃 +
Softmax 𝑘 𝑟 𝑤 𝑉 𝑞 ℝ $ → ℝ %
AGG 𝑓 & 𝑓 ’ ∈ 𝑀(𝑝 & ) 𝑝 & 𝑝 ’ 𝑓 &) 𝜔
U !
U " U " U ! γ
U "
U #
MLP MLP Δ𝑃
+
Gouped AGG Softmax 𝑘 𝑟 𝑤 𝑉 𝑞 ⊙ 𝜔ℝ $ → ℝ * 𝑓 & 𝑓 &) 𝑓 ’ ∈ 𝑀(𝑝 & ) 𝑝 & 𝑝 ’
PTv PTv
Pooling above.
Point Transformer achieves remarkable results in multiple point cloud understanding tasks and state-of-art results for several competitive challenges. In this work, we analyze the limitations of the Point Transformer [1], and propose several novel architecture designs for the attention and pooling module, to improve the efficiency and effectiveness of the Point Transformer.
Our proposed model, Point Transformer V2, performs better than the Point Transformer across a variety of 3D scene understating tasks.
Point Transformer V
We analyze the limitations of Point Transformer V1 (PTv1) [1] and propose our Point Transformer V (PTv2), including several improved modules upon PTv1.
We begin by introducing the mathematical formulations and revisiting the vector self-attention used in PTv1 in Sec. 3.1.
Based on the observation that the parameters of PTv1 increases drastically with the increased model depth and channel size, we propose our efficient and powerful grouped vector attention in Sec. 3.2.
Further, we introduce our improved weight encoding in Sec.
3.1 and the new pooling method in Sec. 3.4.
We finally describe our network architecture in Sec. 3.5.
3.1 Problem Formulation and Background
Problem formulation.
Let M =
( P , F ) be a 3D point cloud scene containing a set of points x i
= ( p i , f i ) ∈ M , where p i ∈ R 3 represents the point position, and f i ∈ R c represents the point features.
Point cloud semantic segmentation aims to predict a class label for each point x i , and the goal of scene classification is to predict a class label for each scene M .
M ( p ) denotes a mapping function that maps the point at position p to a subset of M denoted as “reference set”.
Next, we revisit the self-attention mechanism used in PTv1 [1].
Local attention.
Conducting the global attention [6, 21] over all points in a scene is computationally heavy and infeasible for large-scale 3D scenes.
Therefore, we apply local attention where the attention for each point x i works within a subset of points, i.e., reference point set, M ( p i ) .
Shifted-grid attention [7], where attention is alternatively applied over two sets of non-overlapping image grids, has become is a common practice [22, 23, 24, 25] for image transformers.
Similarly, the 3D space can be split into uniform non-overlapping grid cells, and the reference set is defined as the points within the same grid, i.e., M ( p i ) =
{ ( p j , f j ) | p j in the same grid cell as p i } .
However, such attention relies on a cumbersome shift grid operation to achieve a global receptive field, and it does not work well on point clouds where the point densities within different grids are not consistent.
PTv1 adopts neighborhood attention , where the reference point set is a local neighborhood of the given point, i.e., M ( p i ) =
{ ( p j , f j ) | p j ∈ Neighborhood ( p i ) } .
Specifically, the neighborhood point set M ( p i ) is defined as the k nearest neighboring (kNN) points of p i in PTv1.
Our experiments (Sec. 4.3) show that neighborhood attention is more effective than shifted-grid attention, so our approach adopts the neighborhood attention.
Scalar attention and vector attention.
Given a point x i =
( p i , f i ) ∈
M , we apply linear projections or MLPs to project the point features
f i to the feature vectors of query q i , key k i , and value v i , each with c h channels.
The standard scalar attention (SA) operated on the point x i and its reference point set M ( p i ) can be represented as follows,
[Equation]
The attention weights in the above formulation are scalars computed from the scaled dot-product [3] between the query and key vectors.
Multi-head scalar attention (MSA) [3] is an extension of SA which runs several scalar attentions in parallel.
MSA is widely applied in transformers, and we will show in Sec. 3.2 that MSA is a degenerate case of our proposed grouped vector attention.
Instead of the scalar attention weights, PTv1 applies vector attention , where the attention weights are vectors that can modulate the individual feature channels.
In SA, the scalar attention is computed by the scaled dot-product between the query and key vectors.
In vector attention, a weight encoding function encodes the relation between query and key to a vector.
The vector attention [2] is formulated as follows,
[Equation]
where ⊙ is the Hadamard product.
γ is a relation function (e.g., subtraction).
ω :
R c
→ R c is a learnable weight encoding (e.g., MLP) that computes the attention vectors to re-weight v j by channels before aggregation.
Fig.
2 (a) shows a method using vector attention with linear weight encoding.
3.2 Grouped Vector Attention
In vector attention, as the network goes deeper and there are more feature encoding channels, the number of parameters for the weight encoding layer increases drastically.
The large parameter size restricts the efficiency and generalization ability of the model.
In order to overcome the limitations of vector attention, we introduce the grouped vector attention, as illustrated in Fig. 1(left).
Attention groups.
We divide channels of the value vector v ∈ R c evenly into g groups ( 1 ≤ g ≤ c ).
The weight encoding layer outputs a grouped attention vector with g channels instead of c channels.
Channels of v within the same attention group share the same scalar attention weight from the grouped attention vector.
Mathematically,
[Equation]
where γ is the relation function and ω :
R c
→ R g is the learnable grouped weight encoding defined in the next paragraph.
The second equation in Eq.
3 is the grouped vector aggregation .
Fig.(a) presents a vanilla GVA implemented by a fully connected weight encoding, the number of the grouped weight encoding function parameters reduced compared with the vector attention (Fig.(b)), leading to a more efficient and powerful model.
GVA is a generalized formulation of VA and MSA.
GVA is also a generalized form of multi-head scalar attention.
In Eq.
3, if we define: Our GVA degenerates to vector attention (VA) when g = c ,
[Figure]
𝛾(𝒒,𝒌) 𝒘 𝒗 𝛾(𝒒,𝒌) 𝒘 𝒗 𝛾(𝒒,𝒌) 𝒘 𝒗 𝛾(𝒒,𝒌) 𝒘 𝒗
and it degenerates to multi-head self-attention (MSA) if ω in Eq.
3 is defined as follows,
[Equation]
where c g = c/g and r ∈ R 1 × c .
Grouped linear.
Inspired by the weight encoding function of MSA, we design the grouped linear layer ζ ( r ) : R c
→ R g where different groups of the input vector are projected with different parameters independently.
Grouped linear further reduce the number of parameters in the weight encoding function.
Our final adopted grouped weight encoding function is composed of the grouped linear layer, normalization layer, activation layer, and a fully connected layer to allow inter-group information exchange.
Mathematically,
[Equation]
ω [Equation] r [Equation]
Linear ◦ Act ◦ Norm
[Equation]
ζ
[Equation]
r [Equation] 6) where c g = c/g , p 1 , . . . , p g ∈ R cg are learnable parameters, and ◦ represents function composition.
3.3 Position Encoding Multipler
Different from the discrete, regular-grid pixels in 2D images, points in the 3D point cloud are unevenly distributed in a continuous Euclidean Metric space, making the spatial relationship in 3D point cloud much more complicated than 2D images.
In transformers and attention modules, the spatial information is obtained with the position encoding δ bias ( p i − p j )) added to the relation vector γ ( q i , k j ) as a bias.
Due to the generalization limitation of vector attention in PTv1 mentioned in Sec. 3.2, adding more position encoding capacity to vector attention will not help to improve the performance.
In PTv2, the grouped vector attention has an effect of reducing overfitting and enhancing generalization.
With grouped vector attention restricting the capacity of the attention mechanism, we strengthen the position encoding with an additional multiplier ω ( δ mul ( p i − p j ) to the relation vector, which focuses on learning complex point cloud positional relations.
As shown in Fig.
1 (left), our improved position encoding is as follows,
[Equation]
where ⊙ is the Hadamard product.
δ mul , δ bias : R d (cid:55)→ R d are two MLP position encoding functions, which take relative positions as input.
Position encoding multiplier compliments group vector attention to achieve a good balance of network capacity.
3.4 Partition-based Pooling
Traditional sampling-based pooling procedures adopted by other point-based methods use a combination of sampling and query methods. In the sampling stage, farthest point sampling [4] or grid sampling [5] is used to sample points reserved for the following encoding stage. For each sampled point, a neighbor query is performed to aggregate information from the neighboring points. In these sampling-based pooling procedures, the query sets of points are not spatially-aligned since the information density and overlap among each query set are not controllable.
To address the problem, we propose a more efficient and effective partition-based pooling approach, as shown in Fig.
Pooling.
Given a point set M =
( P , F ) , we partition M into subsets [ M 1 , M 2 , ..., M n ′ ] by separating the space into non-overlapping partitions.
We fusion each subset of points M i =
( P i , F i ) from a single partition as follows,
[Equation]
where ( p ′ i , f ′ i ) is the position and features of pooling point aggregated form subset M i , and U ∈
R c × c ′ is the linear projection.
Collecting the pooling points from n ′ subsets gives us the point set M ′ =
{ p ′ i , f ′ i } n ′ i =1 for the next stage of encoding.
In our implementation, we use uniform grids to partition the point cloud space, and thus our partition-based pooling is also called grid pooling. Unpooling. The common practice of unpooling by interpolation is also applicable to partition-based pooling.
Here we introduce a more straightforward and efficient unpooling method. To unpool the fused point set M ′ back to M , the point locations in M are record from the pooling process, and we only need to obtain the features for each point in M .
With the help of the grid-based partitioning [ M 1 , M 2 , ..., M n ′ ] during the pooling stage, we can map point feature to all points from the same subset,
[Equation]
3.5 Network Architecture
Backbone structure.
Following previous works [18, 1], we adopt the U-net architecture with skip connections.
There are four stages of encoders and decoders with block depths [2, 2, 6, 2] and [1, 1, 1, 1], respectively.
The grid size multipliers for the four stages are [x3.0, x2.5, x2.5, x2.5], representing the expansion ratio over the previous pooling stage.
The attention is conducted in a local neighborhood, described in “neighborhood attention” in Sec. 3.1.
In Sec.
4.3 we compare the neighborhood attention with shift-grid attention.
The initial feature dimension is 48, and we first embed the input channels to this number with a basic block with attention groups of 6.
Then, we double this feature dimension and attention groups each time entering the next encoding stage.
The initial feature dimension is 48.
For the four encoding stages, the feature dimensions are [96, 192, 384, 384], and the corresponding attention groups are [12, 24, 48, 48].
Output head.
For point cloud semantic segmentation, we apply an MLP to map point features produced by the backbone to the final logic for each point in the input point set.
For point cloud classification, we apply global average pooling over the point features produced by the encoding stages to obtain a global feature vector, followed by an MLP classifier for prediction.
Experiments
To validate the effectiveness of the proposed method, we conduct experimental evaluations on ScanNet v2 [44] and S3DIS [45] for semantic segmentation, and ModelNet40 [46] for shape classification.
Implementation details are available in the appendix. [Table] [Table]
4.1 Semantic Segmentation
Data and metric.
For semantic segmentation, we experiment on ScanNet v2 [44] and S3DIS [45].
The ScanNet v2 dataset contains 1,513 room scans reconstructed from RGB-D frames.
The dataset is divided into 1,201 scenes for training and 312 for validation.
Point clouds for the model input are sampled from vertices of reconstructed meshes, and each sampled point is assigned a semantic label from 20 categories (wall, floor, table, etc.).
The S3DIS dataset for semantic scene parsing consists of 271 rooms in six areas from three different buildings.
Following a common protocol [36, 4, 1], area 5 is withheld during training and used for testing.
Different from ScanNet v2, points of S3DIS are densely sampled on the mesh surfaces and annotated into 13 categories.
Following a standard protocol [4], we use mean class-wise intersection over union (mIoU) as the evaluation metric for validation and test set of ScanNet v2.
And we use mean class-wise intersection over union (mIoU), mean of class-wise accuracy (mAcc), and overall point-wise accuracy (OA) for evaluating performance on S3DIS area5.
Performance comparison.
Table 1 and Table 2 show the results of our PTv2 model compared with previous methods on ScanNet v2 and S3DIS, respectively.
Our PTv2 model outperforms prior methods in all evaluation metrics.
Notably, PTv2 significantly outperforms PTv1 [1] by 4.9% mIoU on the ScanNet v2 validation set.
Visualization.
The qualitative results of point cloud semantic segmentation are shown in Fig.
3 and
Fig.
Our PTv2 model is able to predict semantic segmentation results that are quite close the ground-truth.
It is worth noting that our model can capture the detailed structure information and predict the correct semantics for challenging scenarios.
For example, in the S3DIS scenes with chairs,
PTv2 is able to cleanly predict the chair legs and armrests.
4.2 Shape Classification
Data and metric.
We test our proposed PTv2 model for 3D point cloud classification on ModelNet dataset.
The ModelNet40 [46] dataset consists of 12,311 CAD models belonging to 40 object categories.
9,843 models are split out for training, and the rest 2,468 models are reserved for testing.
Following the common practice in the community, we report the class-average accuracy (mAcc) and overall accuracy (OA) on the test set.
Performance comparison.
We test our PTv2 model and compare it with previous models on the
ModelNet40 dataset for shape classification.
Results are shown in Table 3, demonstrating that our proposed PTv2 model achieves state-of-the-art performance on ModelNet40 shape classification.
The visualization results of shape classification are provided in the supplementary materials.
We conduct ablation studies to examine the effectiveness of each module in our design.
The ablation study results are reported on ScanNet v2 validation set. Input Ground truth PTv
Input
Ground truth
PTv [Figure] [Figure] Attention type.
We first investigate the effects of different attention designs.
We experiment with two types of local attention introduced in Sec. 3.1, namely shifted-grid attention and neighborhood attention [1].
Then, to validate the effectiveness of our proposed grouped vector attention (denoted as “GVA”), we compare it with the commonly-used multi-head self-attention (denoted as “MSA”).
We use the vanilla position encoding in PTv1 [1] and our proposed partition-based pooling scheme in all of the experiments in Table 4.
It shows neighborhood attention performs significantly better than shiftedgrid attention, indicating that the neighborhood attention is better suited for point clouds which are non-uniformly distributed.
Moreover, our proposed grouped vector attention consistently outperforms the commonly-used multi-head self-attention with both shifted-grid attention and neighborhood attention.
So our grouped vector attention is not only more efficient, but also more effective, than multi-head self-attention.
The comparison between GVA and MSA indicates the effectiveness of the learnable parameters in the grouped linear layer of the grouped weight encoding in Sec. 3.2. 4.3 Ablation Study
Weight encoding.
We study the effects of different weight encoding functions ω in Table 6.
The weight encoding functions are introduced in Sec.
3.1 and Sec. 3.2, and different attention mechanisms adopt different weight encoding functions.
We use the vanilla position encoding in PTv1 [1] and our proposed grid pooling scheme in all of the experiments in Table 4.
We experimented with the following weight encoding functions: (1) The weight encoding for multi-head scalar attention in Eq.
4, denoted as “MSA”.
(2) Weight encoding as a linear layer denoted as “L”.
The grouped linear layer, which is ζ in Eq.
5, denoted as “GL”.
The linear layer followed by batch normalization, activation, and another linear layer, denoted as “L+N+A+L”.
The grouped linear layer, followed by batch normalization, activation, and a linear layer, denoted as “GL+N+A+L”.
(5) is also the grouped weight encoding function used for our grouped vector attention, introduced as ω in Eq.
Results in Table 6 demonstrate that our grouped weight encoding function outperforms other compared designs.
Specifically, comparing (1), (3) and (5), GL slightly outperforms MSA but adding additional inter-group information exchange combined with proper normalization and activation can boost the performance to be better than MSA.
Moreover, the comparison between (5) and (4) and the comparison between (3) and (2) both indicate that our grouped linear layer outperforms the naive linear layer, even though the grouped linear layer has g times fewer parameters and requires less computing than the linear layer. [Table] [Table] [Table]
[Table]
[Table]
Pooling methods.
In Sec.
3.4 we discuss the potential limitations of the sampling-based pooling in
PTv1 and propose a new pooling and unpooling scheme based on non-overlapping partitions.
We also name a simple and effective grid-based implement of our partition-based pooling as grid pooling.
To further examine the superiority of our method, we experiment with different pooling-unpooling schemes in Table 5.
For our partition-based pooling implemented by a grid, the base grid size is 0.02 meters, which is identical to the voxelization grid size during data pre-processing.
The grid size multipliers are the grid size expansion ratio over the previous pooling stage.
For example, [ × 4 . 0 , × 2 . 0 , × 2 . 0 , × 2 . 0 ] means that the grid sizes are: [ 0 . 08 , 0 .
32 , 0 . 64 ] meters, respectively.
We choose a relatively large value for initial grid sizes ( × 3 . 0 and × 4 . 0 ) to provide sufficiently large receptive fields, which is analogous to the common practice in image transformers [6].
For subsequent pooling stages, we observe that × 2 . 0 grid size increase results in an approximate pooling ratio of 4 for the point cloud, while × 2 .grid size increase results in an approximate pooling ratio of 6.
We choose the same sampling ratio of 4 and 6 for sampling-based pooling to ensure a fair comparison.
The results in Table 5 illustrate that our partition-based pooling achieves higher mIoU than the sampling-based method.
For sampling-based pooling with farthest point sampling, the performance decreases significantly when the sampling ratio increases from 4 to 6.
However, for our partition-based pooling implemented by grid, we observe that initial grid size and subsequent grid size multipliers do not significantly affect the overall performance, so we can use larger grid sizes to reduce the number of points in each stage to save memory.
Module design.
We ablate different modules introduced in our PTv2: grouped vector attention (VGA), position encoding multiplier (PE Mul), partition-based pooling implemented by grid (Grid Pool), and partition map unpooling (Map Unpool).
The model adopts in Experiment I is PTv1 [1], which serves as a baseline result of our design. Benefiting from structural parameter adjustments and better data processing, which are also shared with the rest of the experiments, our baseline result increased from 70.6% to 72.3%.
Experiment II to V add each of our proposed components in turns, gradually increasing our baseline result to 75.4%.
The increasing mIOU indicates the effectiveness of each component. [Table] [Table]
4.4 Model Complexity and Latency
We further conduct model complexity and latency studies to examine the superior efficiency of several design in our work.
We record the amortized forward time for each scan in the ScanNet v2 validation set with batch size 4 on a single TITAN RTX.
Pooling methods. Table 8 shows the forward time and mIoU of PTv2 with different pooling methods and pooling ratios. We compare our pooling method with two classical sampling-based pooling methods: FPS-kNN and Grid-kNN. FPS-kNN pooling [4, 1] uses farthest point sampling (FPS) to sample a specified number of points and then query k nearest neighbor points for pooling.
We call the pooling method in Strided KPConv [5] Grid-kNN pooling, as it uses a uniform grid to sample points and then applies the kNN method to index neighbors.
This leads to uncontrollable overlaps of the pooling receptive fields.
As shown in the table, our grid pooling method is not only faster but also achieves higher mIoUs.
Module design.
Table 9 summarizes comparisons of model complexity, time consumption, and evaluation performances on ScanNet v2 validation set.
Meanwhile, we drop the first batch of forwarding time for GPU preparation.
In Table 9, GVA refers to grouped vector attention.
L refers to grouped weight encoding implemented by a single Linear.
GL refers to grouped weight encoding implemented by a Grouped Linear.
GL-N-A-L refers to the grouped linear layer, followed by batch normalization, activation, and a linear layer as grouped weight encoding function.
GP refers to partition-based pooling implemented by grid.
PEM refers to the position encoding multiplier.
To ensure fair comparison, PTv1 is set to be the same depth and feature dimensions as our model architecture of PTv2.
By comparing experiment 1 ⃝ and 2 ⃝ , we can study the effect of GVA.
The same spirit goes on for experiment 3 ⃝ , 4 ⃝ , and 5 ⃝ , where each experiments adds one additional module, so that we can study the effect of the added module respectively.
Comparing experiments 1 ⃝ , 2 ⃝ , 3 ⃝ , and 4 ⃝ , the introduction of grouped vector attention (GVA) with grouped weight encoding dramatically improves the model performance and slightly reduces execution time.
The comparison between 4 ⃝ and 5 ⃝ indicates that the grid pooling strategy can significantly speed up the network and further enhance the generalization ability of our model.
Position encoding multiplier is the only design that increases the number of model parameters, but experiment 6 ⃝ demonstrates its effectiveness in improving performance.
Meanwhile, our model is still lightweight compared to voxel-based backbones, such as MinkUnet42 [18] with 37.9M parameters.
We propose Point Transformer V2 (PTv2), a powerful and efficient transformer-based backbone for 3D point cloud understanding.
Our work makes several non-trivial improvements upon Point
Transformer V1 [1], including the grouped vector attention, improved position encoding, and partitionbased pooling.
Our PTv2 model achieves state-of-the-art performance on point cloud classification and semantic segmentation benchmarks.
Potential negative social impact.
When training the Point Transformer V2 model on large datasets, researchers should be aware of the potential negative social impact introduced by the dataset bias and improper usage of the model.
Appendix
In the appendix, we provide more experiment details in Sec.
A, more experiment results in Sec.
B.
A Experiment Details
This section describes the model architectures adopted in the experiments and describes the experimental settings for each dataset in detail.
A.1 Model Architecture
In Fig.
5, we show the detailed network architectures for semantic segmentation and shape classification.
Tuples under each stage block indicate the number of sampled points and feature dimensions of attention blocks, and the number of sampled points is determined by grid sizes, as specified in the main paper.
L a b e l: c h a i r (𝑁 ! ,96) (𝑁,48) (𝑁 " ,192) (𝑁 # ,384) (𝑁 $ ,384) (𝑁 # ,384) (𝑁 " ,192) (𝑁 ! ,96) (𝑁,48) (𝑁,𝐷 %&’ )
(𝑁 $ ,512) (𝑁 # ,384) (𝑁 " ,192) (𝑁 ! ,
[Figure]
) (𝑁,48) (1,𝐷 %&’ ) GVA Block Grid Down
Grid Up AvgPool MLP
Experimental environment. Software and hardware environment: • CUDA version: 11.
• cuDNN version: 8.0. • PyTorch version: 1.10. • GPU:
Nvidia RTX A6000 ×• CPU: Intel Xeon Platinum 8180 @ 2.50 GHz × Data license.
Our experiments use open-source datasets widely applied for 3D recognition research. The ScanNet v2 [44] dataset is under the MIT license, while S3DIS [45] and ModelNet40 [46] have custom licenses that only allow academic use. Data preprocessing and augmentation. For S3DIS and ModelNet40 datasets, we adopt the data preprocessing of PTv1 [1] with slight adjustments to the augmentation.
For ScanNet v2, we estimate normal vectors for points as additional feature input. The data augmentation strategies are different for each dataset, as shown in Table 10.
The detailed settings for each type of data augmentation will be available in our open-source code. Training details. Our specific model training settings are available in Table 11. For the segmentation task, AdamW is used to reduce overfitting of the model.
Scheduler with a cosine annealing policy has a better performance on ScanNet v2, which has more data than S3DIS. We use cross-entropy loss for all experiments. B Additional Quantitative Results In this section, more quantitative results are provided to validate and analyze our proposed network architecture.
[Table]
[Table]
We show ablation experiments on the depths of each decoder block with different unpooling methods in Table 12.
Applying at least one attention block in each decoding stage can significantly improve the model performance
[Table]
and this phenomenon is more evident while utilizing our mapping pooling. But deeper decoders (from a depth of 1 to 2 for each decoder block) do not improve performance. These phenomena are reasonable since the naive unpooling methods such as interpolation and mapping require a learnable block to optimize the sampled features. In 2D, deconvolution with stride is widely used to unpooling and optimize features simultaneously, and such a process usually does not require a deep network.
[Table] B.2 Ablation study on Position Encoding Multiplier Table 13 shows an additional ablation study on PE Multiplier. PE Multiplier does not work well with PTv1 since PTv1 already overfits to the training set.
Adding more capacity to the PTv1 will not help improve the performance. On PTv2, the group vector attention (GVA) has an effect of reducing overfitting and enhancing generalization. With GVA restricting the capacity of the attention mechanism, the addition of PE Multiplier can focus on learning complex point cloud positional relations. PE Multiplier compliments group vector attention to achieve a good balance of network capacity.
We compare three different feature-level pooling methods: FPS-kNN, Grid-kNN, and our partitionbased pooling implemented by grid. FPS-kNN pooling [4, 1] uses the farthest point sampling (FPS) to sample a specified number of points and then query k nearest neighbor points for pooling. Strided
KPConv [5] uses a uniform grid to sample points and then applies the kNN method to index neighbors, leading to an uncontrollable overlapping of the pooling receptive field. We name this method GridkNN Pooling . Our method values non-overlapping receptive fields and fusion points within each non-overlaping grid cell. To distinguish it from the previous sampling-based method, we name it
Grid Pooling . Benchmark with synthetic data. Table 14 provides benchmark results for the different pooling methods with synthetic data. We generate n points uniformly at random in the unit cube space.
The sampling ratio r the sample size divided by the population size. For comparison, we keep the sampling ratio r the same for different pooling methods. For Grid-kNN and Grid Pooling, the grid size is computed as ( n × r ) − 13 since the point cloud is sampled uniformly at random. We show the combined time of pooling and uppooling for these three methods.
[Table] [Table] [Table] [Table]