class_docstr: Simplest base roi head including one bbox head and one mask head.
code: def __init__(
      self,
      neck=None,
      sampler: OptMultiConfig = None,
      roi_extractor: OptMultiConfig = None,
      rec_head: OptMultiConfig = None,
      init_cfg=None,
  ):
      super().__init__(init_cfg)
      if sampler is not None:
          self.sampler = TASK_UTILS.build(sampler)
      if neck is not None:
          self.neck = MODELS.build(neck)
      self.roi_extractor = MODELS.build(roi_extractor)
      self.rec_head = MODELS.build(rec_head)
  
file_path: mmocr/projects/ABCNet/abcnet/model/rec_roi_head.py
imports: from typing import Tuple
  from mmengine.structures import LabelData
  from torch import Tensor
  from mmocr.registry import MODELS, TASK_UTILS
  from mmocr.structures import TextRecogDataSample
  from mmocr.utils import DetSampleList, OptMultiConfig, RecSampleList
  from .base_roi_head import BaseRoIHead
label_desc: Use image node_id 1 to create a new RecRoIHead object from inherited base classes: BaseRoIHead with example: obj = RecRoIHead(neck, sampler, roi_extractor, rec_head, init_cfg)