DeepLabV3+
- class mmit.decoders.DeepLabV3Plus(input_channels, input_reductions, decoder_channels=[256, 48], atrous_rates=[12, 24, 36], 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'>, mismatch_layer=<class 'mmit.base.mismatch.Pad'>, return_features=False)
Implementation of the DeepLabV3+ decoder. Paper: https://arxiv.org/abs/1802.02611 To make it compatible with any encoder, the first skip connection is with the “middle” feature and the second one with the last.
- Parameters:
input_channels (
List[int]) – The channels of the input features.input_reductions (
List[int]) – The reduction factor of the input features.decoder_channel – The channel to use on the decoder.
atrous_rates (
List[int]) – The atrous rates to use on the ASPP module.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.