DeepLabV3

class mmit.decoders.DeepLabV3(input_channels, input_reductions, decoder_channel=256, atrous_rates=[12, 24, 36], feature_index=None, upsample_layer=<class 'mmit.base.upsamplers.Upsample'>, norm_layer=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>, activation_layer=<class 'torch.nn.modules.activation.ReLU'>, extra_layer=<class 'torch.nn.modules.linear.Identity'>, return_features=False)

Implementation of the DeepLabV3 decoder. Paper: https://arxiv.org/abs/1706.05587 To follow the paper as much as possible, we only process the feature map closest to the stride 8 by default.

Parameters:
  • input_channels (List[int]) – The channels of the input features.

  • input_reductions (List[int]) – The reduction factor of the input features.

  • decoder_channel (int) – The channel to use on the decoder.

  • atrous_rates (List[int]) – The atrous rates to use on the ASPP module.

  • feature_index (Optional[int]) – The index of the feature to use.

  • upsample_layer (Type[Module]) – Upsampling layer to use.

  • norm_layer (Type[Module]) – Normalization layer to use.

  • activation_layer (Type[Module]) – Activation function to use.

  • extra_layer (Type[Module]) – Addional layer to use.

  • return_features (bool) – Whether to return the intermediate results of the decoder.

forward(*features)

Forward pass of the decoder.

Parameters:

*features (Tensor) – Features from the encoder, the first is the input image, last one the deepest.

Return type:

Tensor

property out_classes: int

Number of output classes.