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","."]
docstr: Initialize assigner and sampler.
docstr_tok: ["Initialize","assigner","and","sampler","."]
code: def init_assigner_sampler(self) -> None:
      """Initialize assigner and sampler."""
      self.bbox_assigner = None
      self.bbox_sampler = None
      if self.train_cfg:
          self.bbox_assigner = TASK_UTILS.build(self.train_cfg.assigner)
          self.bbox_sampler = TASK_UTILS.build(
              self.train_cfg.sampler, default_args=dict(context=self)
          )
  
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 3 for calling the RoITrackHead obj's underlying member method code with example usage: obj.init_assigner_sampler() without return types