class_docstr: Main class for semantic segmentation architectures.
class_docstr_tok: ["Main","class","for","semantic","segmentation","architectures","."]
code: def from_config(cls, cfg):
      backbone = build_backbone(cfg)
      sem_seg_head = build_sem_seg_head(cfg, backbone.output_shape())
      return {
          "backbone": backbone,
          "sem_seg_head": sem_seg_head,
          "pixel_mean": cfg.MODEL.PIXEL_MEAN,
          "pixel_std": cfg.MODEL.PIXEL_STD,
      }
  
imports: import numpy
  from typing import Callable, Dict, Optional, Tuple, Union
  import fvcore.nn.weight_init
  import torch
  from torch import nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.layers import Conv2d, ShapeSpec, get_norm
  from detectron2.structures import ImageList
  from detectron2.utils.registry import Registry
  from ..backbone import Backbone, build_backbone
  from ..postprocessing import sem_seg_postprocess
  from .build import META_ARCH_REGISTRY
label_desc: Use image node_id 2 for calling the SemanticSegmentor obj's underlying member method code with example usage: obj.from_config(cls, cfg) and returns: dict