class_docstr: Two-stage text spotter.
  
  Args:
      backbone (dict, optional): Config dict for text spotter backbone.
          Defaults to None.
      neck (dict, optional): Config dict for text spotter neck. Defaults to
          None.
      det_head (dict, optional): Config dict for text spotter head. Defaults
          to None.
      roi_head (dict, optional): Config dict for text spotter roi head.
          Defaults to None.
      data_preprocessor (dict, optional): Config dict for text spotter data
          preprocessor. Defaults to None.
      init_cfg (dict, optional): Initialization config dict. Defaults to
          None.
code: def __init__(
      self,
      backbone: OptConfigType = None,
      neck: OptConfigType = None,
      det_head: OptConfigType = None,
      roi_head: OptConfigType = None,
      postprocessor: OptConfigType = None,
      data_preprocessor: OptConfigType = None,
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(
          data_preprocessor=data_preprocessor, init_cfg=init_cfg
      )
  
      self.backbone = MODELS.build(backbone)
      if neck is not None:
          self.neck = MODELS.build(neck)
      if det_head is not None:
          self.det_head = MODELS.build(det_head)
  
      if roi_head is not None:
          self.roi_head = MODELS.build(roi_head)
  
      if postprocessor is not None:
          self.postprocessor = MODELS.build(postprocessor)
  
file_path: mmocr/projects/ABCNet/abcnet/model/two_stage_text_spotting.py
imports: from typing import Dict
  import torch
  from mmocr.models.textdet.detectors.base import BaseTextDetector
  from mmocr.registry import MODELS
  from mmocr.utils import OptConfigType, OptDetSampleList, OptMultiConfig
label_desc: Use image node_id 1 to create a new TwoStageTextSpotter object from inherited base classes: BaseTextDetector with example: obj = TwoStageTextSpotter(backbone, neck, det_head, roi_head, postprocessor, data_preprocessor, init_cfg)