Create PointNet++ segmentation network
PointNet++ is a neural network that predicts point-wise labels for an unorganized
lidar point cloud. The network partitions the input points into a set of clusters and then
extracts the features using a multi-layer perceptron (MLP) network. To use this network for
semantic segmentation, train it using the
trainNetwork (Deep Learning Toolbox) function.
specifies options using one or more name-value arguments in addition to the input arguments
in the preceding syntax. For example,
lgraph = pointnetplusLayers(___,Name=Value)
creates a PointNet++ network with 32 points in each cluster.
Define the input parameters for a custom PointNet++ network.
numPoints = 10000; pointsDim = 3; numClasses = 8;
Create the custom PointNet++ network.
lgraph = pointnetplusLayers(numPoints,pointsDim,numClasses, ... NormalizationLayer="instance", ... NumSetAbstractionModules=3, ... NumClusters=2048, ... ClusterRadius=0.1, ... ClusterSize=32, ... PointNetLayerSize=32);
Analyze the network using the
analyzeNetwork (Deep Learning Toolbox) function.
You can train this network using the
trainNetwork (Deep Learning Toolbox) function and use it for different applications. To learn more about training the PointNet++ network, see the Aerial Lidar Semantic Segmentation Using PointNet++ Deep Learning example.
numPoints— Number of points in input point cloud
Number of points in the input point cloud, specified as a positive integer.
pointsDim— Dimensions of input point cloud matrix
Dimensions of the input point cloud data matrix, specified as a positive integer
greater than or equal to
3. The matrix must contain the
xyz coordinates and any additional data such as range, mask, and
numClasses— Number of classes
Number of classes the network must be configured to classify, specified as a
positive integer greater than
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
lgraph = pointnetplusLayers(numPoints,pointsDim,numClasses,NumSetAbstractionModules=3);
NormalizationLayer— Type of normalization
NumSetAbstractionModules— Number of set abstraction modules
4(default) | positive integer
Number of set abstraction modules for the encoder subnetwork, specified as a positive integer. The decoder subnetwork contains the same number of feature propagation modules.
NumClusters— Number of clusters
1024(default) | positive integer
Number of clusters to group the input points into, specified as a positive
integer. The value of NumClusters must be a power of two in the range [
N is the number of set abstraction modules.
This value specifies the number of clusters in the first set abstraction module. For subsequent set abstraction modules, the function automatically computes the number of clusters as K/4, where K is the number of clusters from the previous set abstraction module.
ClusterRadius— Cluster radius of input points
0.1(default) | positive scalar in range (0, 1]
Cluster radius of the input points, specified as a positive scalar in the range (0, 1].
This value specifies the cluster radius for the first set abstraction module. For subsequent set abstraction modules, the function automatically computes the cluster radius as twice the value from the previous set abstraction module.
ClusterSize— Number of points in each cluster
32(default) | positive integer
Number of points in each cluster, specified as a positive integer. For a given cluster radius in each set abstraction module, this value must be a power of two less than K/4(N — 2). K is the number of clusters in the network and N is the number of set abstraction modules.
This value is constant across all set abstraction modules.
PointNetLayerSize— Size of first layer in MLP network
32(default) | positive integer
Size of first layer in the MLP network of the set abstraction module, specified as
a positive integer. Each set abstraction module contains a mini PointNet with a shared
MLP network implemented using
convolution. The sizes of first, second, and third layers in the shared MLP network
are S, S, 2*S which
correspond to the number of filters in the first, second and third convolution layers,
This value specifies the size of first layer in the MLP network of the first set abstraction module. For each subsequent set abstraction modules, the value of S is twice the value of S from the previous set abstraction module.
A PointNet++ network has an encoder subnetwork with set abstraction modules, followed by a corresponding decoder subnetwork with feature propagation modules.
The set abstraction module identifies new cluster centers using farthest point sampling and groups the points into clusters using the ball query algorithm. The feature propagation module interpolates the points using inverse weighted distance based on the k-nearest neighbors algorithm.
The function creates the network with single scale grouping (SSG) architecture.
The function uses the narrow-normal weight initialization method to initialize the weights of each convolution layer in the network.
The function initializes all bias terms to zero.