class_docstr: MaskFormer fusion head which postprocesses results for panoptic
  segmentation, instance segmentation and semantic segmentation.
class_docstr_tok: ["MaskFormer","fusion","head","which","postprocesses","results","for","panoptic","segmentation",",","instance","segmentation","and","semantic","segmentation","."]
docstr: Semantic segmengation postprocess.
  
  Args:
      mask_cls (Tensor): Classfication outputs of shape
          (num_queries, cls_out_channels) for a image.
          Note `cls_out_channels` should includes
          background.
      mask_pred (Tensor): Mask outputs of shape
          (num_queries, h, w) for a image.
  
  Returns:
      :obj:`PixelData`: Semantic segment result.
docstr_tok: ["Semantic","segmengation","postprocess",".","Args",":","mask_cls","(","Tensor",")",":","Classfication","outputs","of","shape","(","num_queries",",","cls_out_channels",")","for","a","image",".","Note","`","cls_out_channels","`","should","includes","background",".","mask_pred","(","Tensor",")",":","Mask","outputs","of","shape","(","num_queries",",","h",",","w",")","for","a","image",".","Returns",":",":","obj",":","`","PixelData","`",":","Semantic","segment","result","."]
code: def semantic_postprocess(
      self, mask_cls: Tensor, mask_pred: Tensor
  ) -> PixelData:
      """Semantic segmengation postprocess.
  
      Args:
          mask_cls (Tensor): Classfication outputs of shape
              (num_queries, cls_out_channels) for a image.
              Note `cls_out_channels` should includes
              background.
          mask_pred (Tensor): Mask outputs of shape
              (num_queries, h, w) for a image.
  
      Returns:
          :obj:`PixelData`: Semantic segment result.
      """
      # TODO add semantic segmentation result
      raise NotImplementedError
  
file_path: mmdetection/mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py
imports: from typing import List
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData, PixelData
  from torch import Tensor
  from mmdet.evaluation.functional import INSTANCE_OFFSET
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.mask import mask2bbox
  from mmdet.utils import OptConfigType, OptMultiConfig
  from .base_panoptic_fusion_head import BasePanopticFusionHead
label_desc: Use image node_id 4 for calling the MaskFormerFusionHead obj's underlying member method code with example usage: obj.semantic_postprocess(mask_cls, mask_pred) without return types