class_docstr: Cascade roi head including one bbox head and one mask head.
  
  https://arxiv.org/abs/1712.00726
docstr: Initialize box head and box roi extractor.
  
  Args:
      bbox_roi_extractor (:obj:`ConfigDict`, dict or list):
          Config of box roi extractor.
      bbox_head (:obj:`ConfigDict`, dict or list): Config
          of box in box head.
docstr_tok: ["Initialize","box","head","and","box","roi","extractor",".","Args",":","bbox_roi_extractor","(",":","obj",":","`","ConfigDict","`",",","dict","or","list",")",":","Config","of","box","roi","extractor",".","bbox_head","(",":","obj",":","`","ConfigDict","`",",","dict","or","list",")",":","Config","of","box","in","box","head","."]
code: def init_bbox_head(
      self, bbox_roi_extractor: MultiConfig, bbox_head: MultiConfig
  ) -> None:
      """Initialize box head and box roi extractor.
  
      Args:
          bbox_roi_extractor (:obj:`ConfigDict`, dict or list):
              Config of box roi extractor.
          bbox_head (:obj:`ConfigDict`, dict or list): Config
              of box in box head.
      """
      self.bbox_roi_extractor = ModuleList()
      self.bbox_head = ModuleList()
      if not isinstance(bbox_roi_extractor, list):
          bbox_roi_extractor = [
              bbox_roi_extractor for _ in range(self.num_stages)
          ]
      if not isinstance(bbox_head, list):
          bbox_head = [bbox_head for _ in range(self.num_stages)]
      assert (
          len(bbox_roi_extractor) == len(bbox_head) == self.num_stages
      )
      for roi_extractor, head in zip(bbox_roi_extractor, bbox_head):
          self.bbox_roi_extractor.append(MODELS.build(roi_extractor))
          self.bbox_head.append(MODELS.build(head))
  
imports: from typing import List, Sequence, Tuple, Union
  import torch
  import torch.nn
  from mmengine.model import ModuleList
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.task_modules.samplers import SamplingResult
  from mmdet.models.test_time_augs import merge_aug_masks
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import bbox2roi, get_box_tensor
  from mmdet.utils import ConfigType, InstanceList, MultiConfig, OptConfigType, OptMultiConfig
  from ..utils.misc import empty_instances, unpack_gt_instances
  from .base_roi_head import BaseRoIHead
label_desc: Use image node_id 2 for calling the CascadeRoIHead obj's underlying member method code with example usage: obj.init_bbox_head(bbox_roi_extractor, bbox_head) without return types