Main Content

squeezesegv2Network

Create SqueezeSegV2 segmentation network for organized lidar point cloud

Since R2024a. Recommended over squeezesegv2Layers.

Description

net = squeezesegv2Network(inputSize,numClasses) creates a SqueezeSegV2 segmentation network and returns it as net, a dlnetwork (Deep Learning Toolbox) object, for organized point clouds of size inputSize and the number of classes numClasses.

SqueezeSegV2 is a convolutional neural network that predicts pointwise labels for an organized lidar point cloud.

example

net = squeezesegv2Network(___,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in the preceding syntax. For example, squeezesegv2Network(inputSize,numClasses,NumEncoderModules=4) sets the number of encoders used to create the network to four.

Note

This function requires Deep Learning Toolbox™.

Examples

collapse all

Define the input parameters for a custom SqueezeSegV2 network.

inputSize = [64 512 6];
numClasses = 2;

Create a custom SqueezeSegV2 network.

net = squeezesegv2Network(inputSize,numClasses, ...
NumEncoderModules=4,NumContextAggregationModules=2);

Analyze the network using the analyzeNetwork (Deep Learning Toolbox) function.

analyzeNetwork(net)

You can train this network using the trainnet (Deep Learning Toolbox) function and use it for different applications. For more information on how to train a SqueezeSegV2 network, see the Lidar Point Cloud Semantic Segmentation Using SqueezeSegV2 Deep Learning Network example.

Input Arguments

collapse all

Size of the network input, specified as one of these options:

  • Two-element vector of the form [height width].

  • Three-element vector of the form [height width channels], where channels specifies the number of input channels. Set channels to 3 for RGB images, to 1 for grayscale images, or to the number of channels for multispectral and hyperspectral images.

Number of semantic segmentation classes, specified as an integer greater than 1.

Name-Value Arguments

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: squeezesegv2Network(inputSize,numClasses,NumEncoderModules=4) sets the number of encoders used to create the network to four.

Number of encoder modules used to create the network, specified as a nonnegative integer. Each encoder module consists of two fire modules and one max-pooling layer connected sequentially. If you specify 0, then the function returns a network with a default encoder that consists of convolution and max-pooling layers with no fire modules. Use this name-value argument to customize the number of fire modules in the network.

Number of context aggregation modules (CAMs), specified as an integer in the range [0,3]. If you specify 0, then the function creates a network without a CAM.

Flag to get initialized network, specified as logical 1 (true) or 0 (false).

  • true or logical 1 — The function returns initialized SqueezeSegV2 network.

  • false or logical 0 — The function returns uninitialized SqueezeSegV2 network.

Output Arguments

collapse all

Output SqueezeSegV2 network, returned as a dlnetwork (Deep Learning Toolbox) object.

More About

collapse all

SqueezeSegV2 Network

  • A SqueezeSegV2 network consists of encoder modules, CAMs, intermediate fixed fire modules [1] for feature extraction, and decoder modules. The function automatically configures the number of decoder modules based on the specified number of encoder modules.

  • The function uses narrow-normal weight initialization method to initialize the weights of each convolution layer within encoder and decoder subnetworks.

  • The function initializes all bias terms to zero.

  • The function adds the padding for all convolution and max-pooling layers such that the output has the same size as the input (if the stride equals 1).

  • The height of the input tensor is significantly lower than the width in organized lidar point cloud data. To address this, the network downsamples the width dimension of the input data in convolution and max-pooling layers. The width of the input data must be a multiple of 2(D + 2), where D is the number of encoder modules used to create the network.

  • This function does not provide a recurrent conditional random field (CRF) layer.

References

[1] Wu, Bichen, Xuanyu Zhou, Sicheng Zhao, Xiangyu Yue, and Kurt Keutzer. “SqueezeSegV2: Improved Model Structure and Unsupervised Domain Adaptation for Road-Object Segmentation from a LiDAR Point Cloud.” In 2019 International Conference on Robotics and Automation (ICRA), 4376–82. Montreal, QC, Canada: IEEE, 2019.https://doi.org/10.1109/ICRA.2019.8793495.

Version History

Introduced in R2024a

expand all