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: Extract roi features.
  
  Args:
      feats (list[Tensor]): list of multi-level image features.
      bboxes (list[Tensor]): list of bboxes in sampling result.
  
  Returns:
      tuple[tuple[Tensor], list[int]]: The extracted roi features and
      the number of bboxes in each image.
docstr_tok: ["Extract","roi","features",".","Args",":","feats","(","list","[","Tensor","]",")",":","list","of","multi-level","image","features",".","bboxes","(","list","[","Tensor","]",")",":","list","of","bboxes","in","sampling","result",".","Returns",":","tuple","[","tuple","[","Tensor","]",",","list","[","int","]","]",":","The","extracted","roi","features","and","the","number","of","bboxes","in","each","image","."]
code: def extract_roi_feats(
      self, feats: List[Tensor], bboxes: List[Tensor]
  ) -> Tuple[Tuple[Tensor], List[int]]:
      """Extract roi features.
  
      Args:
          feats (list[Tensor]): list of multi-level image features.
          bboxes (list[Tensor]): list of bboxes in sampling result.
  
      Returns:
          tuple[tuple[Tensor], list[int]]: The extracted roi features and
          the number of bboxes in each image.
      """
      rois = bbox2roi(bboxes)
      bbox_feats = self.roi_extractor(
          feats[: self.roi_extractor.num_inputs], rois
      )
      num_bbox_per_img = [len(bbox) for bbox in bboxes]
      return bbox_feats, num_bbox_per_img
  
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 5 for calling the RoITrackHead obj's underlying member method code with example usage: obj.extract_roi_feats(feats, bboxes) and returns: bbox_feats,  num_bbox_per_img