class_docstr: Base class for RoIHeads.
code: def __init__(
      self,
      bbox_roi_extractor=None,
      bbox_head=None,
      mask_roi_extractor=None,
      mask_head=None,
      shared_head=None,
      train_cfg=None,
      test_cfg=None,
  ):
      super(BaseRoIHead, self).__init__()
      self.train_cfg = train_cfg
      self.test_cfg = test_cfg
      if shared_head is not None:
          self.shared_head = build_shared_head(shared_head)
  
      if bbox_head is not None:
          self.init_bbox_head(bbox_roi_extractor, bbox_head)
  
      if mask_head is not None:
          self.init_mask_head(mask_roi_extractor, mask_head)
  
      self.init_assigner_sampler()
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/base_roi_head.py
imports: from abc import ABCMeta, abstractmethod
  import torch.nn
  from ..builder import build_shared_head
label_desc: Use image node_id 1 to create a new BaseRoIHead object from inherited base classes: nn with example: obj = BaseRoIHead(bbox_roi_extractor, bbox_head, mask_roi_extractor, mask_head, shared_head, train_cfg, test_cfg)