Main Content

pointNetPlusClassifier

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:

    • Create a pretrained 3-D point cloud classification model by using a PointNet++ deep learning network trained on the Sydney Urban Objects data set [2].

    • Classify 3-D point clouds by using the classify object function.

    • If you have the training data, you can create an untrained pointNetPlusClassifier object and use the trainPointNetPlusClassifier function to train the network. Using this function, you can also perform transfer learning to retrain a pretrained network.

    Creation

    Description

    classifier = pointNetPlusClassifier creates a pretrained point cloud classifier by using a PointNet++ deep learning network trained on the Sydney Urban Objects data set.

    example

    classifier = pointNetPlusClassifier(weights,classNames) 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 = pointNetPlusClassifier(weights,classNames,Name=Value) sets writable properties using one or more name-value arguments. For example, ModelName="pointCloudClassifier" creates a pointNetPlusClassifier 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.

    • "sydney-urban" — Creates a pointNetPlusClassifier object using a pretrained PointNet++ deep learning network trained on common urban road objects, scanned using a Velodyne® HDL-64E lidar sensor, from the Sydney Urban Objects data set.

      Note

      The pretrained network has been trained using only the location information of the point cloud data.

    • "random" — Creates a pointNetPlusClassifier object using an untrained PointNet++ network with randomly initialized weights. For this option, you must specify class names using the classNames input argument.

    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.

    • If you create an untrained network by specifying weights as "random", you must specify this argument to configure the pointNetPlusClassifier object for training from scratch.

    • If you create a pretrained network by specifying weights as "sydney-urban", you can use this argument to specify custom object classes and configure the pointNetPlusClassifier object for transfer learning. Otherwise, the network uses these default classes for the pretrained network.

    This argument sets the ClassNames property.

    Data Types: string | cell | categorical

    Name-Value Arguments

    expand all

    Specify optional pairs of arguments as Name1=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.

    • If the weights argument value is "sydney-urban", the default value of ModelName is 'sydney-urban'.

    • If you specify weights as "random", the default value of ModelName is ''.

    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 only NumPoints number of points, as the PointNet++ network expects a fixed number of points.

    This argument sets the NumPoints property. You must specify the classNames 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 the weights 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 the classNames input argument when calling the pointNetPlusClassifier function.

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

    • If you create an untrained network by specifying weights as "random", you must specify the classNames argument to set this property, and configure the pointNetPlusClassifier object for training from scratch.

    • If you create a pretrained network by specifying weights as "sydney-urban", you can set this property by specifying classNames, and configure the pointNetPlusClassifier object for transfer learning. Otherwise, the network uses the default classes for the pretrained network.

    Data Types: categorical

    This property is read-only after object creation. To set this property, use the NumPoints input argument when calling the pointNetPlusClassifier 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 only NumPoints 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 the NumPoints name-value argument, along with the weights 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.

    • If the weights argument value is "sydney-urban", the default value of ModelName is 'sydney-urban'.

    • If you specify weights as "random", the default value of ModelName is ''.

    Data Types: char

    Object Functions

    classifyClassify 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