class_docstr: Encoder Decoder segmentors.
  
  EncoderDecoder typically consists of backbone, decode_head, auxiliary_head.
  Note that auxiliary_head is only used for deep supervision during training,
  which could be dumped during inference.
class_docstr_tok: ["Encoder","Decoder","segmentors",".","EncoderDecoder","typically","consists","of","backbone",",","decode_head",",","auxiliary_head",".","Note","that","auxiliary_head","is","only","used","for","deep","supervision","during","training",",","which","could","be","dumped","during","inference","."]
docstr: Extract features from images.
docstr_tok: ["Extract","features","from","images","."]
code: def extract_feat(self, img):
      """Extract features from images."""
      x = self.backbone(img)
      if self.with_neck:
          x = self.neck(x)
      return x
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmseg.core import add_prefix
  from mmseg.models import builder
  from mmseg.models.builder import SEGMENTORS
  from mmseg.models.segmentors.base import BaseSegmentor
  from mmseg.ops import resize
label_desc: Use image node_id 4 for calling the EncoderDecoderMask2Former obj's underlying member method code with example usage: obj.extract_feat(img) and returns: x