vis4d.op.seg.semantic_fpn

Semantic FPN Head for segmentation.

Classes

SemanticFPNHead([num_classes, in_channels, ...])

SemanticFPNHead used in Panoptic FPN.

SemanticFPNOut(outputs)

Output of the SemanticFPN prediction.

class SemanticFPNHead(num_classes=53, in_channels=256, inner_channels=128, start_level=2, end_level=6, dropout_ratio=0.1)[source]

SemanticFPNHead used in Panoptic FPN.

Creates an instance of the class.

Parameters:
  • num_classes (int) – Number of classes. Default: 53.

  • in_channels (int) – Number of channels in the input feature map.

  • inner_channels (int) – Number of channels in inner features.

  • start_level (int) – The start level of the input features used in SemanticFPN.

  • end_level (int) – The end level of the used features, the end_level-th layer will not be used.

  • dropout_ratio (float) – The drop ratio of dropout layer. Default: 0.1.

__call__(feats)[source]

Type definition for function call.

Return type:

SemanticFPNOut

forward(features)[source]

Transforms feature maps and returns segmentation prediction.

Parameters:

features (list[Tensor]) – List of multi-level image features.

Returns:

Segmentation outputs.

Return type:

SemanticFPNOut

init_weights()[source]

Initialize weights.

Return type:

None

class SemanticFPNOut(outputs: Tensor)[source]

Output of the SemanticFPN prediction.

Create new instance of SemanticFPNOut(outputs,)

outputs: Tensor

Alias for field number 0