1 of 101

Point Transformer

2 of 101

Lecturer 1

Hao-Yu Hsu

3 of 101

Problem Formulation

Point Cloud

Downstream Application

4 of 101

Quick recap of previous point-based networks

  • Direct on point clouds: PointNet, PointNet++
  • Graph-based methods: DGCNN, DeepGCN
  • Continuous convolutions: PCNN, PointConv, KPConv, PointCNN
  • In this paper, self-attention networks are used for processing point clouds.

Qi, Charles R., et al. "Pointnet: Deep learning on point sets for 3d classification and segmentation." CVPR. 2017.

Qi, Charles Ruizhongtai, et al. "Pointnet++: Deep hierarchical feature learning on point sets in a metric space." NeurIPS. 2017.

Wang, Yue, et al. "Dynamic graph cnn for learning on point clouds." ACM ToG. 2019.

Li, Guohao, et al. "Deepgcns: Can gcns go as deep as cnns?." ICCV. 2019.

Wang, Shenlong, et al. "Deep parametric continuous convolutional neural networks." CVPR. 2018.

Wu, Wenxuan, Zhongang Qi, and Li Fuxin. "Pointconv: Deep convolutional networks on 3d point clouds." CVPR. 2019.

Thomas, Hugues, et al. "Kpconv: Flexible and deformable convolution for point clouds." ICCV. 2019.

Li, Yangyan, et al. "Pointcnn: Convolution on x-transformed points." NeurIPS. 2018.

5 of 101

Quick recap of Transformer

Transformer → multi-head self-attention layers → self-attention layers

Vaswani, A. "Attention is all you need." NeurIPS. 2017.

6 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

7 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

8 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

9 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

10 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

11 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

12 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

13 of 101

ML Courses: https://speech.ee.ntu.edu.tw/~tlkagk/courses/ML_2019/Lecture/Transformer%20(v5).pdf

14 of 101

Point Transformer Layer & Positional Encoding

  • Positional encoding is important in self-attention to allow the operator to focus on local structure.
  • 3D point coordinates themselves are a natural candidate for positional encoding.
  • Transformer layer is in essence a set operator which is invariant to point permutations.

Key & Query

Value

P.E.

Value

Value

P.E.

P.E.

Key

Key

Query

Query

P.E.

relation op.

mlp

mlp

relation op.

softmax

softmax

15 of 101

Network Architecture (overall structure)

Zhao, Hengshuang, et al. "Point transformer." ICCV. 2021.

16 of 101

Network Architecture (overall structure)

Qi, Charles Ruizhongtai, et al. "Pointnet++: Deep hierarchical feature learning on point sets in a metric space." NeurIPS. 2017.

17 of 101

Network Architecture (layer design)

18 of 101

PTv1 Results

Wu, Zhirong, et al. "3d shapenets: A deep representation for volumetric shapes." CVPR. 2015.

19 of 101

PTv1 Results

Armeni, Iro, et al. "3d semantic parsing of large-scale indoor spaces." CVPR. 2016.

20 of 101

PTv1 Ablations on P.E.

21 of 101

Takeaway

  • Simple yet effective idea, a key part is how to make it work.

22 of 101

Point Transformer v2/v3

Rachel Moan

23 of 101

The story so far

PTv1

PTv2

PTv3

Introduces attention networks for point clouds

24 of 101

PTv1 Limitations

  1. Attention layer is prone to overfitting and doesn’t scale well
  2. Doesn’t exploit 3D information for positional encoding
  3. Uses sampling based pooling, which is not spatially well aligned

PTv2 Solution

  1. Grouped vector attention (GVA) instead of vector attention
  2. Additional position encoding multiplier
  3. Partition based pooling strategy

25 of 101

PTv2: GVA and Position Encoding

  • Vector Attention
    • a weight encoding function encodes the relation between query and key to a vector
    • Omega is the learnable weight encoding

  • Grouped Vector Attention
    • Divide the c channels of the value vector into g groups
    • Each channel in a group will share the same scalar attention weight

26 of 101

PTv2: Partition based pooling

  • Separate the point cloud into non-overlapping partitions
  • Get the point and feature representing each partitioned group

PTv1

PTv2

27 of 101

V2 Results

S3DIS

ScanNet

28 of 101

The story so far

PTv1

PTv2

PTv3

Introduces attention networks for point clouds

Improves on PTv1 architecture, better performance

29 of 101

PTv3: Efficiency and Scalability

  • PTv1 & PTv2 weakness: scalability
  • PTv3 Solution:
    • Used serialized method instead of KNN
    • Replace complex attention patch interaction mechanisms with methods intended for streamlined point clouds
    • Replace relative positional encoding with prepositive sparse convolutional layer

30 of 101

Point Cloud Serialization

  1. Use a space-filling curve to order the points
  2. Use serialized encoding to convert each point’s position to an integer that represents its order in the curve
  3. Sort the points
  4. Group points into patches

31 of 101

PTv3 Results: Efficiency

32 of 101

PTv3 Results: Scalability

Blue dot indicates training with multi-dataset joint training (increasing the scale of the model)

33 of 101

The End

PTv1

PTv2

PTv3

Introduces attention networks for point clouds

Improves on PTv1 architecture, better performance

Addresses the scalability issue, maintains performance

34 of 101

Archaeologist 1

Kulbir

35 of 101

Previous work

  • Attention mechanism:
    • Window attention
    • Attention is localized:
      • Applied to every point’s K nearest neighbors
      • Computes a weighted aggregation of features from the neighboring points
      • No shared intermediate computations are reused
    • Lack of global context
  • Relative Positional Encoding�
  • Extract hierarchical features + Downsample:
    • Farthest Point Sampling ⇒ can lead to information loss

Figure: Attention is applied to k-nearest neighbors of each point� [Reference: Peng-Shuai Wang. 2023. OctFormer: Octree-based Transformers for 3D Point Clouds.]

36 of 101

Window attention

  • Partition of point cloud:
    • uses cubic windows �
  • Unequal no. of points/window
    • Due to sparse point clouds�
  • Attention is constrained in each “non-overlapping” 3D cuboid window
    • Each point attends to the points in the same window�
  • Limitation:
    • Unequal points per window ⇒ Parallelization is challenging
      • Increased computation cost because of varying no. of points/window

Figure: Window attention on a point cloud with front and back view. Each color represents a window.

37 of 101

Octree attention

  • Partition of point cloud:
    • Use sorted shuffled keys of the octree
    • “Sort points by building octrees”�
  • Equal no. of points/window�
  • Efficient execution of attention modules using GPUs�
  • Limitation:
    • Computation overhead in dynamic environments
    • Irregular shapes can lead to inconsistent receptive fields
    • Cannot capture local geometric structures uniformly across the point cloud for non-uniform complex geometries

Figure: Octree attention on a point cloud with front and back view. Note that each window has the same number of points. Each color represents a window.

38 of 101

Window attention v/s Octree attention

Window attention

Octree attention

Partition type

Cubic windows

Irregular windows

Number of points

Unequal no. of points/window

Equal number of points/window, Parallelizable

Attention

Local attention within each window

Local attention within each window

Data adaptability

Limited for non-uniform data

Highly adaptable for sparse/irregular data

39 of 101

Test SAM 2! : Automatic Mask Generation

  • Does not maintain mask consistency over multiple viewpoints if the continuity of the mask is broken
    • Despite points being in the same irregular window�
  • Some low quality stray masks are generated�
  • Need to tune parameters for controlling:
    • Density of point sampling
    • Thresholds for low quality mask or duplicate mask removal

40 of 101

OctFormer

  • Octree Attention avoids KNN + FPS
    • uses Conditional Positional Encoding (CPE) that depends on octree-based depth-wise convolutions�
    • CPE incorporates positional information into the attention mechanism. �
    • Dynamically generates positional encodings based on the features and the octree structure.

Figure: OctFormer architecture

Figure: Window partition for the octree attention.

Refer: Peng-Shuai Wang. 2023. OctFormer: Octree-based Transformers for 3D Point Clouds. ACM Trans. Graph. (SIGGRAPH) 42, 4 (August 2023)

41 of 101

Why choose Octree attention?

Strengths:

  1. Adaptive Partitioning for Varying Point Densities
  2. Hierarchical Representation for Multi-Scale Feature Learning
    1. captures both local and global context

Limitations:

  1. Window attention: REduced receptive field + No info propagation amongst windows
    1. Solution: Dilated Octree Attention
  2. Loss of details in regions with high point density or intricate structures
  3. Dynamically changing point clouds:
    • Rebuilding octree is expensive for every frame

Figure: Octree Attention [Refer: Peng-Shuai Wang. 2023. OctFormer: Octree-based Transformers for 3D Point Clouds. ACM Trans. Graph. (SIGGRAPH) 42, 4 (August 2023)]

42 of 101

Improvements in Point Transformer - v3

  1. Transformers for 3D point cloud processing
    1. Larger receptive field for same efficiency
      1. 16 ⇒ 1024 points �
  2. Attention mechanism:
    • Window + Dot product attn�
  3. Positional encoding:
    • Conditional PE�
  4. Serialize point clouds into structured sequences
    • Various space filling curves
      • Z order
      • Hilbert

Figure: Point Transformer-v3 architecture

43 of 101

Why use “Structured point clouds”?

  • Capture local and global spatial structures
    • w/o KNN search�
  • Hence:
    • Scalable�
    • Maintains spatial proximity�
    • Spatially close points are also close in the sorted list��

Figure: Z-order point cloud serialization space filling curve, grouped patches for local attention

Figure: Trans Z-order point cloud serialization and other additional space filling curve can help capture various spatial relationships and contexts

44 of 101

Archaeologist 2

Wenqi Jia

45 of 101

Impact of Point Transformer

  • Inspire other transformer-based model on point-cloud segmentation
  • Trigger series of debates over architecture selection: which one is the best?

Publish Year

Citations

GitHub Stars

Point Transformer V1

ICCV 2021

1,992

496

Point Transformer V2

NeurIPS 2022

250

349

Point Transformer V3

CVPR 2024

59

738

46 of 101

Stratified Transformer for 3D Point Cloud Segmentation

  • Use a stratified Transformer to capture both local and global contexts in a hierarchical manner. It improves segmentation accuracy on standard benchmarks
  • Shows that Transformer models can be further enhanced on large-scale 3D point cloud segmentation tasks

Lai, Xin, et al. "Stratified transformer for 3d point cloud segmentation." (CVPR, 2022). https://openaccess.thecvf.com/content/CVPR2022/papers/Lai_Stratified_Transformer_for_3D_Point_Cloud_Segmentation_CVPR_2022_paper.pdf

47 of 101

Fast Point Transformer

  • Introduces optimizations to the original Point Transformer to reduce the computational cost of self-attention
  • Improves scalability and efficiency, enabling faster processing of large point cloud datasets without significantly sacrificing accuracy in tasks like classification and segmentation
  • Making it more practical for real-world large-scale applications

48 of 101

Debate Over Architecture Design:

is transformer really all you need?

49 of 101

PointMLP

  • An alternative approach to the Point Transforme; using simpler Multi-Layer Perceptrons (MLPs) layers
  • Better performance on tasks like classification and segmentation
  • Significantly faster and more efficient, especially in terms of computation and memory usage, by avoiding the computational overhead of attention

Ma, Xu, et al. "Rethinking network design and local geometry in point cloud: A simple residual MLP framework." (ICLR, 2022).

https://arxiv.org/pdf/2202.07123

50 of 101

PointConvFormer: a hybrid architecture

  • Local convolution for capturing fine-grained local features and transformer attention for capturing long-range dependencies
  • Achieves a balance between efficiency and accuracy by integrating the best aspects of both convolutions and transformers

Wu, Wenxuan, Li Fuxin, and Qi Shan. "Pointconvformer: Revenge of the point-based convolution." (CVPR, 2023). https://openaccess.thecvf.com/content/CVPR2023/papers/Wu_PointConvFormer_Revenge_of_the_Point-Based_Convolution_CVPR_2023_paper.pdf

51 of 101

Private Investigator

David Yao

52 of 101

53 of 101

Zhao Hengshuang

54 of 101

Wu Xiaoyang

55 of 101

  • Powerful and flexible codebase for point cloud perception research

  • Pointcloud preprocessing, training, evaluation pipelines

56 of 101

Industrial Practitioner

Steven Gao

57 of 101

58 of 101

59 of 101

Infrastructure Inspection

  1. Costly
  2. Dangerous

60 of 101

Non-Destructive Inspection

Why RGB sometimes aren’t enough?

  1. Can’t measure depth of cracks, spalling, etc
    1. Reconstruction might fail due to occlusions
  2. Damages internal to structural components

61 of 101

Non-Destructive Inspection

Attach to a drone

  • LiDAR
  • Phase-Array Ultrasound

Analyzing collected data is laborious!

62 of 101

Automating Non-Destructive Inspection

  • NTSB has a trough of annotated data collected in investigations
  • Classification
    • Binary or categorical (ordinal rating)
  • Segmentation
    • Ask engineers to label damaged segments in the point cloud

63 of 101

Automating Non-Destructive Inspection

Segmentation of damages and anomalies for further inspection

64 of 101

Natural Language Interactions

  • PointTransformer adapter for LLaMA
  • Pretrain adapter using unsupervised methods
    • Self-contrastive learning
    • Siamese
  • Instruction fine-tuning
  • Freeze model parameters and fine-tune adapter using RLHF

65 of 101

PointTransformer

Point Cloud

66 of 101

Supervised Fine-Tuning

User: Identify the structure damages in this bridge

Assistant: [paste in curated NTSB report]

67 of 101

RLHF

User: Identify the structure damages in this bridge. For each point of damage, reason step by step on how you arrived at your conclusion. Finally, provide an overall rating of the bridge.

Assistant: [Correctly itemized damages and overall assessment] 👍

Assistant: What’s a bridge? 👎

68 of 101

Critic

Haozhen

69 of 101

Point Transformer V1

  • Inefficient Memory Usage Calculate per-point features and kNN
    • 1702M/2064M/2800M/4266M for 10k/20k/40k/80k input points
  • Scaling Inefficient
    • No distributed optimization mentioned
      • Difficult to adopt parallelization to kNN, V2 decreased sampling but still takes around 28% latency
    • Insufficient experiment for large-scale scenes
      • >100k points / Outdoor Scenes (Stpls3d, etc.)
    • Limit to model depth
      • MLP increase encoding parameters drastically as model depth increases, leading to severe overfitting

Hu, Qingyong, et al. "Towards semantic segmentation of urban-scale 3D point clouds: A dataset, benchmarks and challenges." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021.

70 of 101

Point Transformer V2

  • Lack of mathematical proof that employing an additional multiplier to the positional encoding enhance the model’s capability on learning complex point cloud positional relations. (ablation study only show slight increase)

OpenReview:

https://openreview.net/forum?id=I3mLa12s_H

71 of 101

Point Transformer V2

  • Lack of complexity analysis of grid-based sampling (params, time)

OpenReview:

https://openreview.net/forum?id=I3mLa12s_H

72 of 101

Graduate Student

Junzhe Wu

73 of 101

Multiple modalities

Point cloud serialization provides a robust methodology for transforming n-dimensional data into a structured 1D format. This technique can similarly be applied to image data, enabling its conversion into a language-style 1D structure that PTv3 can efficiently encode.

74 of 101

Multiple modalities

This encoding method for both image and pointcloud enables the development of multimodal models that bridge 2D and 3D spaces, integrates both image and point cloud data to get a better segmentation result.

75 of 101

Autonomous Off-Road Vehicles with 3D Terrain Adaptation

Point Transformer V3 could be applied to autonomous off-road vehicles (e.g., self-driving trucks, ATVs, or exploratory robots) to handle unstructured and unpredictable terrains. By processing detailed 3D point cloud data of rugged landscapes, these vehicles can make real-time navigation decisions and adapt to dynamic environments like forests, mountains, or desert dunes.

76 of 101

Hacker 1

Tianhang Cheng

77 of 101

Data Preparation

randomly sample 2d point cloud in image where the pixel value > 0

78 of 101

Result

Experiment 1: train on 30 sparse points

Input dimension: 30*2, Accuracy: 2743/10000 (27%), #Params: 25610

Experiment 2: train on sparse points, with z-ordered (row * 28 + column)

Input dimension: 30*2, Accuracy: 6662/10000 (67%), #Params: 25610

79 of 101

Result

Experiment 3: train on 100 sparse points

Input dimension: 100*2, Accuracy: 2056/10000 (21%), #Params: 43530

Experiment 4: train on sparse points, with z-ordered (row * 28 + column)

Input dimension: 100*2, Accuracy: 8195/10000 (82%) , #Params: 43530

80 of 101

Result

Experiment 3: train on 300 sparse points

Input dimension: 100*2, Accuracy: 2513/10000 (25%), #Params: 94730

Experiment 4: train on sparse points, with z-ordered (row * 28 + column)

Input dimension: 100*2, Accuracy: 8237/10000 (82%) , #Params: 94730

81 of 101

Summary

From bottom to up:

More point, less accuray

When there are no order

82 of 101

Summary

From up to bottom:

More point, more accuracy (may saturate)

When there exists an order

83 of 101

Hacker 2

Shaowei Liu

84 of 101

Short recap of KNN used in Point Transformer

  • Point Transformer v1:
    • KNN for Local Neighborhood Selection: KNN is applied to select a fixed number of nearest neighbors for each point, which helps in defining the local neighborhood over which self-attention is applied.
    • Feature Aggregation: After selecting the neighbors using KNN, features are aggregated from the local neighborhood
  • KNN implementation: Heap Sort

85 of 101

Short recap of KNN used in Point Transformer

  • Point Transformer v2
    • Adaptive KNN: KNN is used more dynamically in conjunction with ball query or radius-based neighborhood search to allow for adaptive neighborhood sizes depending on the local point density.
    • Improved Attention Mechanism: KNN helps by focusing attention on the most relevant neighboring points, improving both the efficiency and accuracy of local feature extraction

86 of 101

Short recap of KNN used in Point Transformer

  • Point Transformer v3
    • Serialized Neighborhoods: Instead of using KNN to find neighbors, Point Transformer v3 organizes point clouds into serialized sequences using space-filling curves (e.g., Hilbert and Z-order curves).
    • Efficient Attention Mechanism: serialized allows for the use of patch attention rather than neighborhood attention, grouping points into non-overlapping patches for attention.

87 of 101

KNN efficiency

  • Data Structures:
    • Use KD-Tree, Ball Tree, or R-Tree to organize data and reduce search complexity.
  • Approximate Methods:
    • Leverage ANN methods (e.g., LSH) to speed up search by finding approximate neighbors.
  • CUDA/GPU Acceleration:
    • Utilize GPU-based libraries (e.g., cuML, FAISS) for parallel distance computations.
  • Optimized Search:
    • Use branch-and-bound techniques and priority queues to minimize unnecessary searches.
  • Dimensionality Reduction:
    • Reduce the number of dimensions to speed up distance calculations.
  • Distributed Computing:
    • Parallelize KNN computation across multiple machines or nodes for large datasets.

88 of 101

Interactive demo of different KNN methods

89 of 101

KD Tree

  • K-Dimensional Tree
    • organizes data points in a k-dimensional space. It partitions the space into hyperplanes, each node representing a region of the space.
  • Advantages:
    • Efficient for low-dimensional data
  • Limitations:
    • Performance degrades as dimensionality increases (curse of dimensionality)
  • Side note for KNN:
    • Maintain a max heap of size k. Keep on searching in k-d tree using dimensional splitting
  • Host Demo: https://shaoweiliu.web.illinois.edu/cs598_knn_benchmark/kd-tree/

90 of 101

Ball Tree

  • Structure:
    • Each node in the tree represents a ball containing data points, and the tree is built by recursively partitioning the dataset into smaller balls.
  • Compare:
    • Instead of using axis-aligned hyperplanes like KD-Tree, Ball Tree uses Euclidean distance to form the balls, making it more adaptable in high-dimensional spaces.
  • Advantages:
    • More efficient than KD-Tree for higher-dimensional data
  • Limitations:
    • While better than KD-Tree for high dimensions, performance can still degrade significantly in very high-dimensional spaces.
  • Host demo

91 of 101

KNN methods comparison

92 of 101

Benchmark 5 algorithms

  • Naive brute force KNN
  • KD-Tree
  • Ball-Tree
  • ANN
  • Hashing (LSN)

  • Ablation on number of points
  • Ablation on dimension per points

93 of 101

Number of points

  • 1000 pts, 5 dimension

94 of 101

Number of points

  • 10000 pts, 5 dimension

95 of 101

Number of points

  • 100000 pts, 5 dimension

96 of 101

Number of dim

  • 10000 pts, 5 dimension

97 of 101

Number of dim

  • 10000 pts, 20 dimension

98 of 101

Number of dim

  • 10000 pts, 100 dimension

99 of 101

Number of dim

  • 10000 pts, 1000 dimension

100 of 101

Open-benchmarks

  • https://ann-benchmarks.com/

101 of 101

Conclusion