Main Content

deeplabv3plusLayers

(To be removed) Create DeepLab v3+ convolutional neural network for semantic image segmentation

deeplabv3plusLayers will be removed in a future release. Use the deeplabv3plus function instead. For more information, see Version History.

Description

layerGraph = deeplabv3plusLayers(imageSize,numClasses,network) returns a DeepLab v3+ layer with the specified base network, number of classes, and image size.

example

layerGraph = deeplabv3plusLayers(___,"DownsamplingFactor",value) additionally sets the downsampling factor (output stride) [1] to either 8 or 16. The downsampling factor sets the amount the encoder section of DeepLab v3+ downsamples the input image.

Examples

collapse all

Create a DeepLab v3+ network based on ResNet-18.

imageSize = [480 640 3];
numClasses = 5;
network = "resnet18";
lgraph = deeplabv3plusLayers(imageSize,numClasses,network, ...
             "DownsamplingFactor",16);

Display the network.

analyzeNetwork(lgraph)

Input Arguments

collapse all

Network input image size, specified as a:

  • 2-element vector in the format [height, width].

  • 3-element vector in the format [height, width, 3]. The third element, 3, corresponds to RGB.

Number of classes for network to classify, specified as an integer greater than 1.

Base network, specified as resnet18 (Deep Learning Toolbox), resnet50 (Deep Learning Toolbox), mobilenetv2 (Deep Learning Toolbox), xception (Deep Learning Toolbox), or inceptionresnetv2 (Deep Learning Toolbox). You must install the corresponding network add-on.

Output Arguments

collapse all

DeepLab v3+ network, returned as a layerGraph (Deep Learning Toolbox) object for semantic image segmentation. The network uses encoder-decoder architecture, dilated convolutions, and skip connections to segment images. You must use the trainNetwork (Deep Learning Toolbox) function (requires Deep Learning Toolbox™) to train the network before you can use the network for semantic segmentation.

Algorithms

  • When you use either the xception (Deep Learning Toolbox) or mobilenetv2 (Deep Learning Toolbox) base networks to create a DeepLab v3+ network, depth separable convolutions are used in the atrous spatial pyramid pooling (ASPP) and decoder subnetworks. For all other base networks, convolution layers are used.

  • This implementation of DeepLab v3+ does not include a global average pooling layer in the ASPP.

References

[1] Chen, L., Y. Zhu, G. Papandreou, F. Schroff, and H. Adam. "Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation." Computer Vision — ECCV 2018, 833-851. Munic, Germany: ECCV, 2018.

Extended Capabilities

expand all

Version History

Introduced in R2019b

expand all