class_docstr: Implementation of `Masked-attention Mask
  Transformer for Universal Image Segmentation
  <https://arxiv.org/pdf/2112.01527>`_.
  
  Args:
      backbone (dict): Configuration of backbone. Defaults to None.
      track_head (dict): Configuration of track head. Defaults to None.
      data_preprocessor (dict or ConfigDict, optional): The pre-process
         config of :class:`TrackDataPreprocessor`.  it usually includes,
          ``pad_size_divisor``, ``pad_value``, ``mean`` and ``std``.
          Defaults to None.
      init_cfg (dict or list[dict]): Configuration of initialization.
          Defaults to None.
class_docstr_tok: ["Implementation","of","`","Masked-attention","Mask","Transformer","for","Universal","Image","Segmentation","<","https",":","\/\/arxiv.org\/pdf\/2112.01527",">","`","_",".","Args",":","backbone","(","dict",")",":","Configuration","of","backbone",".","Defaults","to","None",".","track_head","(","dict",")",":","Configuration","of","track","head",".","Defaults","to","None",".","data_preprocessor","(","dict","or","ConfigDict",",","optional",")",":","The","pre-process","config","of",":","class",":","`","TrackDataPreprocessor","`",".","it","usually","includes",",","``","pad_size_divisor","``",",","``","pad_value","``",",","``","mean","``","and","``","std","``",".","Defaults","to","None",".","init_cfg","(","dict","or","list","[","dict","]",")",":","Configuration","of","initialization",".","Defaults","to","None","."]
code: def __init__(
      self,
      backbone: Optional[dict] = None,
      track_head: Optional[dict] = None,
      data_preprocessor: OptConfigType = None,
      init_cfg: OptMultiConfig = None,
  ):
      super(BaseMOTModel, self).__init__(
          data_preprocessor=data_preprocessor, init_cfg=init_cfg
      )
  
      if backbone is not None:
          self.backbone = MODELS.build(backbone)
  
      if track_head is not None:
          self.track_head = MODELS.build(track_head)
  
      self.num_classes = self.track_head.num_classes
  
file_path: mmdetection/mmdet/models/vis/mask2former_vis.py
imports: from typing import Optional, Union
  from torch import Tensor
  from mmdet.models.mot import BaseMOTModel
  from mmdet.registry import MODELS
  from mmdet.structures import TrackDataSample, TrackSampleList
  from mmdet.utils import OptConfigType, OptMultiConfig
label_desc: Use image node_id 1 to create a new Mask2FormerVideo object from inherited base classes: BaseMOTModel with example: obj = Mask2FormerVideo(backbone, track_head, data_preprocessor, init_cfg)