class_docstr: Implementation of `SparseInst <https://arxiv.org/abs/1912.02424>`_
  
  Args:
      data_preprocessor (:obj:`ConfigDict` or dict, optional): Config of
          :class:`DetDataPreprocessor` to process the input data.
          Defaults to None.
      backbone (:obj:`ConfigDict` or dict): The backbone module.
      encoder (:obj:`ConfigDict` or dict): The encoder module.
      decoder (:obj:`ConfigDict` or dict): The decoder module.
      criterion (:obj:`ConfigDict` or dict, optional): The training matcher
          and losses. Defaults to None.
      test_cfg (:obj:`ConfigDict` or dict, optional): The testing config
          of SparseInst. Defaults to None.
      init_cfg (:obj:`ConfigDict` or dict, optional): the config to control
          the initialization. Defaults to None.
class_docstr_tok: ["Implementation","of","`","SparseInst","<","https",":","\/\/arxiv.org\/abs\/1912.02424",">","`","_","Args",":","data_preprocessor","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","Config","of",":","class",":","`","DetDataPreprocessor","`","to","process","the","input","data",".","Defaults","to","None",".","backbone","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","backbone","module",".","encoder","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","encoder","module",".","decoder","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","decoder","module",".","criterion","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","training","matcher","and","losses",".","Defaults","to","None",".","test_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","The","testing","config","of","SparseInst",".","Defaults","to","None",".","init_cfg","(",":","obj",":","`","ConfigDict","`","or","dict",",","optional",")",":","the","config","to","control","the","initialization",".","Defaults","to","None","."]
docstr: Extract features.
  
  Args:
      batch_inputs (Tensor): Image tensor with shape (N, C, H ,W).
  
  Returns:
      tuple[Tensor]: Multi-level features that may have
      different resolutions.
docstr_tok: ["Extract","features",".","Args",":","batch_inputs","(","Tensor",")",":","Image","tensor","with","shape","(","N",",","C",",","H",",","W",")",".","Returns",":","tuple","[","Tensor","]",":","Multi-level","features","that","may","have","different","resolutions","."]
code: def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
      """Extract features.
  
      Args:
          batch_inputs (Tensor): Image tensor with shape (N, C, H ,W).
  
      Returns:
          tuple[Tensor]: Multi-level features that may have
          different resolutions.
      """
      x = self.backbone(batch_inputs)
      x = self.encoder(x)
      return x
  
file_path: mmdetection/projects/SparseInst/sparseinst/sparseinst.py
imports: from typing import List, Tuple, Union
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models import BaseDetector
  from mmdet.models.utils import unpack_gt_instances
  from mmdet.registry import MODELS
  from mmdet.structures import OptSampleList, SampleList
  from mmdet.utils import ConfigType, OptConfigType
label_desc: Use image node_id 5 for calling the SparseInst obj's underlying member method code with example usage: obj.extract_feat(batch_inputs) and returns: x