pointNetPlusClassifier - Create PointNet++ classifier to classify 3-D point clouds - MATLAB (original) (raw)

Create PointNet++ classifier to classify 3-D point clouds

Since R2025a

Description

The pointNetPlusClassifier object creates a PointNet++ network[1] to classify 3-D point clouds that contain only one object. Using this object, you can:

Creation

Syntax

Description

[classifier](#mw%5F85e92d68-c6ab-4bd5-9201-9cf9cc3068b4) = pointNetPlusClassifier creates a pretrained point cloud classifier by using a PointNet++ deep learning network trained on the Sydney Urban Objects data set.

example

[classifier](#mw%5F85e92d68-c6ab-4bd5-9201-9cf9cc3068b4) = pointNetPlusClassifier([weights](#mw%5F6e9f70de-b260-428c-8759-bcdc30e7df53),[classNames](#mw%5Fbedee62e-c5af-43b2-8b5d-9ad7be521b02)) creates a pretrained or untrained PointNet++ network using a specified set of classes.

If you specify weights as "sydney-urban", the function creates a pretrained network and configures it to perform transfer learning using the specified set of classes. For optimal results, train the network on new training data before performing classification. Use the trainPointNetPlusClassifier function to train the network.

If you specify weights as "random", the function creates an untrained network. To train the network, use the trainPointNetPlusClassifier function.

[classifier](#mw%5F85e92d68-c6ab-4bd5-9201-9cf9cc3068b4) = pointNetPlusClassifier([weights](#mw%5F6e9f70de-b260-428c-8759-bcdc30e7df53),[classNames](#mw%5Fbedee62e-c5af-43b2-8b5d-9ad7be521b02),[Name=Value](#namevaluepairarguments)) sets writable properties using one or more name-value arguments. For example,ModelName="pointCloudClassifier" creates apointNetPlusClassifier object with the model name"pointCloudClassifier".

Note

This functionality requires Deep Learning Toolbox™, Lidar Toolbox™, and the Lidar Toolbox Model for PointNet++ Classification support package. You can download and install the Lidar Toolbox Model for PointNet++ Classification from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Input Arguments

expand all

Data set for the pretrained network, specified as one of these options.

Data Types: char | string

Names of object classes to use when training the PointNet++ network, specified as a vector of strings, cell array of character vectors, or categorical vector.

This argument sets the ClassNames property.

Data Types: string | cell | categorical

Name-Value Arguments

expand all

Specify optional pairs of arguments asName1=Value1,...,NameN=ValueN, where Name is 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.

Example: pointNetPlusClassifier(ModelName="pointCloudClassifier") creates a pointNetPlusClassifier object with the model name"pointCloudClassifier".

Name of the PointNet++ network, specified as a string scalar or character vector.

This argument sets the ModelName property.

Data Types: char | string

Number of points input to the PointNet++ network, specified as a positive integer greater than or equal to 1024 and divisible by 256. When you classify point clouds by using the classify object function, the function downsamples the point cloud to retain onlyNumPoints number of points, as the PointNet++ network expects a fixed number of points.

This argument sets the NumPoints property. You must specify theclassNames argument when you specify this argument.

Data Types: single | double

Properties of point clouds input to the PointNet++ network, specified as a string scalar, character vector, string array, or cell array of character vectors.

By default, an untrained or a pretrained PointNet++ network takes only the locations of the points as input. You can provide additional properties by using this argument. For example,pointNetPlusClassifier("sydney-urban",classNames,PointCloudProperty="intensity") creates a PointNet++ network that takes the locations and intensities of the points as input.

This argument sets the PointCloudProperty property. You must specify theweights and classNames arguments when you specify this argument.

Data Types: char | string | cell

Output Arguments

expand all

PointNet++ classifier, returned as a pointNetPlusClassifier object.

Properties

expand all

This property is read-only.

PointNet++ deep learning network to use for point cloud classification, represented as a dlnetwork (Deep Learning Toolbox) object.

This property is read-only after object creation. To set this property, use theclassNames input argument when calling thepointNetPlusClassifier function.

Names of object classes for training the PointNet++ network, stored as a categorical vector.

Data Types: categorical

This property is read-only after object creation. To set this property, use theNumPoints input argument when calling thepointNetPlusClassifier function.

Number of points input to PointNet++ network, stored as a positive integer. When you classify point clouds by using the classify object function, the function downsamples the point cloud to retain onlyNumPoints number of points, as the PointNet++ network expects a fixed number of points.

Data Types: single | double | int16 | int32 | int64 | uint16 | uint32 | uint64

This property is read-only after object creation. To set this property, use theNumPoints name-value argument, along with theweights and classNames arguments, when calling the pointNetPlusClassifier function.

Properties of point clouds input to PointNet++ network, stored as a cell array of character vectors. By default, an untrained or a pretrained PointNet++ network takes only the locations of the points as input.

Example: pointNetPlusClassifier("sydney-urban",classNames,PointCloudProperty="intensity") creates a PointNet++ network that uses the locations and intensities of the points as input to the network.

Data Types: cell

Name of the PointNet++ network, stored as a character vector.

Data Types: char

Object Functions

classify Classify point cloud using PointNet++ classifier

Examples

collapse all

Create a PointNet++ Classifier.

classifier = pointNetPlusClassifier;

Read the input point cloud.

filename = "bus.pcd"; ptCloud = pcread(filename);

Apply the pretrained PointNet++ classifier to the input point cloud.

class = classify(classifier,ptCloud);

Display the input point cloud and its predicted class.

pcshow(ptCloud.Location,[0 1 0], ... MarkerSize=40, ... VerticalAxisDir="down") title(class)

Figure contains an axes object. The axes object with title bus contains an object of type scatter.

References

[1] Qi, Charles R., Li Yi, Hao Su, and Leonidas J. Guibas. “PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space.” In Proceedings of the 31st International Conference on Neural Information Processing Systems, 5105–14. NIPS’17. Red Hook, NY, USA: Curran Associates Inc., 2017.

[2] De Deuge, Mark, Alastair Quadras, Calvin Hung, and Bertrand Douillard. "Unsupervised Feature Learning for Classification of Outdoor 3D Scans." In Australasian Conference on Robotics and Automation 2013 (ACRA 13). Sydney, Australia: ACRA, 2013.

Version History

Introduced in R2025a