Search

Search papers and lessons

PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space

Charles R. Qi, Li Yi, Hao Su et al. · 2017

PointNet++ applies PointNet to small neighborhoods of a point cloud and then to neighborhoods of those, learning local shapes at growing scales and adapting to uneven point density.

On this page

  • Colour = topic mix
  • Linear algebra
  • Discrete math
  • Neural network basics
  • Computer vision
  • Calculus
  • Architectures
  • ReadReady to readNot yet

TL;DR

PointNet++ is a neural network for point clouds, the sets of 3D points that scanners produce. It runs a small PointNet on neighborhoods of points, then on neighborhoods of those neighborhoods, so it learns local shapes at growing scales. When the density of points varies across a scan, it learns to weight the scales, so it holds up on sparse data, and it reached better-than-prior results on the 3D benchmarks the authors tested.

Builds on: PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation, Metric Space, Euclidean Distance · Leads to: the local-neighborhood networks for Point Cloud data

Why it mattered

Point clouds come from 3D scanners and depth sensors on autonomous vehicles and robots. A scan is an unordered set of coordinates, and its density is uneven: points are dense near the sensor and sparse far away. The network before it, PointNet, handled unordered input but did not use the distances between points, so it could not capture small local shapes. PointNet++ restored that structure and gave a clear recipe for hierarchical learning on unordered points. The paper has been cited more than 17,000 times.

On the paper's own tests, PointNet++ was best on the ShapeNet part segmentation benchmark and on the SHREC15 non-rigid shape benchmark. It improved clearly on PointNet across the classification tests it ran.

The problem

A function of a point set should not depend on the order in which the points are listed. PointNet meets this with a symmetric max over per-point features, but it treats the whole cloud as one global set. A convolutional network gets local structure from a grid: a small kernel sees a patch, and stacked layers see larger patches. A point set has no grid, so the network must define neighborhoods from the distances between points.

Density adds a second problem. A neighborhood that is dense in one area can be nearly empty in another. A small neighborhood may hold too few points to describe a pattern, so the usual CNN advice to use small kernels does not carry over. The design therefore has two parts. The network must choose where the local regions are, and it must learn features for each region with one shared local learner, so that weights can be reused across regions as they are in a convolution.

How it works

The basic unit is a set abstraction level. It takes NN points, each with dd coordinates and CC features, and outputs N′N' sampled centroids with dd coordinates and new C′C' features that summarise each local region. It has three layers: sampling, grouping and a PointNet layer. The flow below shows one level.

flowchart LR
  A[Input points with features] --> B[Sampling: farthest point sampling picks centroids]
  B --> C[Grouping: ball query gathers neighbors]
  C --> D[PointNet layer: local features per region]
  D --> E[Fewer points with richer features]
  E --> F[Next level repeats the same steps]

Here is one tiny instance. Six points lie on a line at positions 0, 1, 2, 7, 8 and 9, with no extra features. Two clusters sit at the two ends.

  1. Input. Six points with one coordinate each. Check: two clusters of three points, separated by a gap of 5.
  2. Sampling. Farthest point sampling starts from the first point, 0, then picks the point farthest from those already chosen. The farthest from 0 is 9, which is chosen. Next, the points farthest from both 0 and 9 are 2 and 7, which tie at distance 2. Take 2. The centroids are 0, 9 and 2. Check: the chosen centroids cover both clusters, which random sampling might not do.
  3. Grouping. Ball query with radius 2.5 gathers all points within 2.5 of each centroid. Around 0 it gathers 0, 1 and 2. Around 9 it gathers 7, 8 and 9. Around 2 it gathers 0, 1 and 2 again. Check: each group has three points, and the groups overlap, as the design intends.
  4. Local frame. Subtract each centroid from its group. The group around 0 becomes (0,1,2)(0, 1, 2). The group around 9 becomes (−2,−1,0)(-2, -1, 0), and the group around 2 becomes (−2,−1,0)(-2, -1, 0). Check: the two groups in different places now share one relative pattern, so one shared PointNet can recognise it wherever it occurs.
  5. PointNet per group. A shared mini-PointNet turns each group into one feature vector. The level's output is three points, each with a feature. Check: the output is smaller than the input, and each remaining point summarises its neighborhood.
  6. Next level. Repeat steps 2 to 5 on the three centroids, and finally pool everything into one global vector for classification. Check: each level sees a larger region of the original cloud.
  7. Density. The multi-scale version runs grouping at several radii on the same centroids and concatenates the features. Random input dropout during training teaches the network to combine them. Check: at test time the network sees all the points, so its learned weighting matters most when points are sparse.
  8. Segmentation. To label every original point, features are carried back down by interpolating from the nearest coarse points, then refined by a few shared fully connected layers.

The math

Steps 1 and 5 in symbols: a set function

For an unordered set {x1,x2,…,xn}\{x_1, x_2, \dots, x_n\}, PointNet defines

f(x1,…,xn)=γ(max⁡i=1,…,nh(xi))f(x_1,\dots,x_n)=\gamma\left(\max_{i=1,\dots,n} h(x_i)\right)

where hh maps each point to a feature vector, the max is taken element by element over the points, and γ\gamma maps the pooled vector to the output. Because the max does not depend on order, ff is invariant to permutations of the input.

Step 4 in symbols: the local frame

The points in a group are moved so that the centroid x^\hat{x} is the origin:

xi(j)←xi(j)−x^(j),i=1,…,K,j=1,…,dx_i^{(j)} \leftarrow x_i^{(j)} - \hat{x}^{(j)}, \qquad i = 1,\dots,K, \quad j = 1,\dots,d

Here KK is the number of points in the group and jj indexes coordinates. This is the step that turns (7,8,9)(7, 8, 9) into (−2,−1,0)(-2, -1, 0) in the walkthrough.

Steps 2 and 3 in symbols: sampling and grouping

Farthest point sampling chooses each new centroid as the point whose distance to the nearest already-chosen centroid is largest. Ball query takes all points with d(x,xi)≤rd(x, x_i) \le r, capped at some maximum KK. The alternative, kk-nearest neighbors, takes the kk closest points whatever their distance. The paper prefers the ball because its region has a fixed scale, which makes the learned local features more general across space. In the tiny example, r=2.5r = 2.5 gives three points per group.

Step 7 in symbols: density adaptation

With random input dropout, each training cloud draws a rate θ\theta uniformly from [0,p][0, p], with p≤1p \le 1, and drops each point with probability θ\theta. The paper uses p=0.95p = 0.95 to avoid empty clouds. At test time all points are kept.

In multi-scale grouping, a level with scales r(1),…,r(m)r^{(1)}, \dots, r^{(m)} produces features F(1),…,F(m)F^{(1)}, \dots, F^{(m)} and concatenates them into one multi-scale feature. Multi-resolution grouping instead concatenates a summary of the lower level's subregions with a single PointNet over all raw points in the region, which is cheaper.

Step 8 in symbols: feature propagation

To label every original point, features from NlN_l coarse points are interpolated to Nl−1N_{l-1} points by inverse-distance weighting over the kk nearest coarse points:

f(j)(x)=∑i=1kwi(x) fi(j)∑i=1kwi(x),wi(x)=1d(x,xi)pf^{(j)}(x)=\frac{\sum_{i=1}^{k} w_i(x)\, f_i^{(j)}}{\sum_{i=1}^{k} w_i(x)}, \qquad w_i(x)=\frac{1}{d(x,x_i)^{p}}

The paper uses p=2p = 2 and k=3k = 3. Check with numbers: three neighbors at distances 1, 2 and 4 with feature values 10, 20 and 40 have weights 11, 1/41/4 and 1/161/16. The numerator is 10+5+2.5=17.510 + 5 + 2.5 = 17.5, the denominator is 1.31251.3125, and the interpolated value is 17.5/1.3125≈13.3317.5 / 1.3125 \approx 13.33.

Worked examples

Example
1. Ball query on the tiny cloud
  1. Points are at 0, 1, 2, 7, 8 and 9. The centroid is 8.
  2. Distances from 8: point 7 is 1 away, point 8 is 0, point 9 is 1, and point 2 is 6.
  3. With radius r=1.5r = 1.5, the points within range are 7, 8 and 9.
  4. The group has three points, and its relative coordinates are (−1,0,1)(-1, 0, 1).
  5. Interpretation: a radius that is too small would keep only the centroid itself, which is why the radius must match the point spacing.
Example
2. Feature propagation with three neighbors
  1. Take a point with three coarse neighbors at distances 1, 2 and 4.
  2. Their features are 10, 20 and 40.
  3. The weights 1/d21/d^2 are 11, 1/41/4 and 1/161/16.
  4. The weighted sum of features is 10⋅1+20⋅0.25+40⋅0.0625=17.510 \cdot 1 + 20 \cdot 0.25 + 40 \cdot 0.0625 = 17.5.
  5. The sum of weights is 1+0.25+0.0625=1.31251 + 0.25 + 0.0625 = 1.3125.
  6. The interpolated feature is 17.5/1.3125≈13.3317.5 / 1.3125 \approx 13.33, closest to the nearest neighbor's 10 but pulled toward the others.
Example
3. Density on a real scan, from the paper

A scan of a room has a dense near field and a sparse far field. The paper's virtual scans of ScanNet rooms have this property.

  1. A single-scale network trained on uniform point clouds is applied to the sparse far field.
  2. Its features were learned at one radius, so far-field neighborhoods often hold too few points, and its accuracy falls sharply.
  3. The multi-scale network trained with random input dropout is applied to the same scans.
  4. Its larger-radius features cover the sparse regions, and it stays close to its uniform-density accuracy.
  5. Interpretation: learning from varied densities during training is what carries the network across scans it did not see.

Try it: with random dropout, the paper's multi-scale model loses less than 1 percent between 1024 and 256 test points. Suppose a hypothetical single-scale model scores 90 at 1024 points and loses 8 points at 256. What does it score at 256? Answer: 82.

Results

  • MNIST (2D point sets), error rate in percent: multi-layer perceptron 1.60, LeNet5 0.80, Network in Network 0.47, PointNet vanilla 1.30, PointNet 0.78, and PointNet++ 0.51. The paper reports relative error reductions of 60.8 percent from PointNet vanilla and 34.6 percent from PointNet.
  • Density robustness: with random input dropout at training time, MSG drops by under 1 percent from 1024 to 256 test points. The single-scale version without dropout fails on sparse test clouds.
  • ModelNet40 neighborhood choice (uniform density, accuracy in percent): kNN with k = 16 gives 89.3, kNN with k = 64 gives 90.3, radius 0.1 gives 89.1, and radius 0.2 gives 90.7. Ball query is slightly better, by about 0.4 points.
  • ShapeNet part segmentation, mean IoU in percent: Yi et al. 81.4, PointNet 83.7, SSCNN 84.7, and PointNet++ 85.1.
  • SHREC15 non-rigid shapes, accuracy in percent: DeepGM 93.03, PointNet++ with XYZ features in Euclidean space 60.18, intrinsic features in Euclidean space 94.49, and intrinsic features in a geodesic-induced metric space 96.09. The gain from the metric is the paper's central claim for this benchmark.
  • ScanNet scene labeling on virtual scans: the single-scale network falls sharply when tested on the non-uniform scans. The multi-resolution network is more robust, and the multi-scale network with random input dropout is only slightly affected and has the best accuracy among the methods compared (Figure 5). The per-method values are in a figure, so they are not repeated here.
  • Limits: the main ModelNet40 classification comparison is not repeated here, only the neighborhood study above. The ScanNet density test uses synthetic virtual scans, not real sparse sensor data. The multi-scale version costs about twice as much as the single-scale one, and the authors name inference speed as future work. The radius-versus-kNN gap is small on uniform data.

Reading guide

Check yourself

QuestionWhy does PointNet's max pooling make the output independent of the order of the input points?Show answer
The maximum of a set of numbers does not depend on the order in which they are listed. The max is taken element by element over the points' feature vectors, so any reordering of the input gives the same pooled vector and the same output.
QuestionPoints are at 0, 1, 2, 7, 8 and 9. Using a ball query with radius 1.5, which points fall in the group around the centroid 8?Show answer
The points within 1.5 of 8 are 7, 8 and 9, whose distances are 1, 0 and 1. The group has three points.
QuestionA point has three coarse neighbors at distances 1, 2 and 4, with features 10, 20 and 40, and the interpolation uses p = 2. What is the interpolated feature?Show answer
The weights are 1, 1/4 and 1/16. The weighted sum is 17.5 and the weight total is 1.3125, so the result is 17.5 / 1.3125, which is about 13.33.
QuestionA lidar scan of a warehouse is dense near the sensor and sparse at the far end. A team trained a PointNet++-style model on uniformly sampled clouds. Which training change does the paper suggest, and why?Show answer
Random input dropout during training, with a multi-scale grouping layer. Dropout exposes the network to clouds of varying sparsity, and multi-scale grouping gives it features at several radii, so it can use larger neighborhoods where the cloud is sparse.

Sources

Read the full paper

Charles R. Qi, Li Yi, Hao Su et al., 2017. arXiv:1706.02413