class_docstr: Cascade roi head including one bbox head and one mask head.
  
  https://arxiv.org/abs/1712.00726
code: def __init__(
      self,
      num_stages,
      stage_loss_weights,
      bbox_roi_extractor=None,
      bbox_head=None,
      mask_roi_extractor=None,
      mask_head=None,
      shared_head=None,
      train_cfg=None,
      test_cfg=None,
  ):
      assert bbox_roi_extractor is not None
      assert bbox_head is not None
      assert (
          shared_head is None
      ), "Shared head is not supported in Cascade RCNN anymore"
      self.num_stages = num_stages
      self.stage_loss_weights = stage_loss_weights
      super(CascadeRoIHead, self).__init__(
          bbox_roi_extractor=bbox_roi_extractor,
          bbox_head=bbox_head,
          mask_roi_extractor=mask_roi_extractor,
          mask_head=mask_head,
          shared_head=shared_head,
          train_cfg=train_cfg,
          test_cfg=test_cfg,
      )
  
imports: import torch
  import torch.nn
  from mmdet.core import bbox2result, bbox2roi, bbox_mapping, build_assigner, build_sampler, merge_aug_bboxes, merge_aug_masks, multiclass_nms
  from ..builder import HEADS, build_head, build_roi_extractor
  from .base_roi_head import BaseRoIHead
  from .test_mixins import BBoxTestMixin, MaskTestMixin
label_desc: Use image node_id 1 to create a new CascadeRoIHead object from inherited base classes: BaseRoIHead, BBoxTestMixin, MaskTestMixin with example: obj = CascadeRoIHead(num_stages, stage_loss_weights, bbox_roi_extractor, bbox_head, mask_roi_extractor, mask_head, shared_head, train_cfg, test_cfg)