class_docstr: The roi track head.
  
  This module is used in multi-object tracking methods, such as MaskTrack
  R-CNN.
  
  Args:
      roi_extractor (dict): Configuration of roi extractor. Defaults to None.
      embed_head (dict): Configuration of embed head. Defaults to None.
      train_cfg (dict): Configuration when training. Defaults to None.
      test_cfg (dict): Configuration when testing. Defaults to None.
      init_cfg (dict): Configuration of initialization. Defaults to None.
class_docstr_tok: ["The","roi","track","head",".","This","module","is","used","in","multi-object","tracking","methods",",","such","as","MaskTrack","R-CNN",".","Args",":","roi_extractor","(","dict",")",":","Configuration","of","roi","extractor",".","Defaults","to","None",".","embed_head","(","dict",")",":","Configuration","of","embed","head",".","Defaults","to","None",".","train_cfg","(","dict",")",":","Configuration","when","training",".","Defaults","to","None",".","test_cfg","(","dict",")",":","Configuration","when","testing",".","Defaults","to","None",".","init_cfg","(","dict",")",":","Configuration","of","initialization",".","Defaults","to","None","."]
code: def __init__(
      self,
      roi_extractor: Optional[dict] = None,
      embed_head: Optional[dict] = None,
      regress_head: Optional[dict] = None,
      train_cfg: Optional[dict] = None,
      test_cfg: Optional[dict] = None,
      init_cfg: Optional[dict] = None,
      *args,
      **kwargs,
  ):
      super().__init__(init_cfg=init_cfg)
      self.train_cfg = train_cfg
      self.test_cfg = test_cfg
  
      if embed_head is not None:
          self.init_embed_head(roi_extractor, embed_head)
  
      if regress_head is not None:
          raise NotImplementedError(
              "Regression head is not supported yet."
          )
  
      self.init_assigner_sampler()
  
file_path: mmdetection/mmdet/models/tracking_heads/roi_track_head.py
imports: from abc import ABCMeta
  from typing import List, Optional, Tuple
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures import TrackSampleList
  from mmdet.structures.bbox import bbox2roi
  from mmdet.utils import InstanceList
label_desc: Use image node_id 1 to create a new RoITrackHead object from inherited base classes: BaseModule with example: obj = RoITrackHead(roi_extractor, embed_head, regress_head, train_cfg, test_cfg, init_cfg)