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.
docstr: Predict results from a batch of inputs and data samples with post-
  processing.
docstr_tok: ["Predict","results","from","a","batch","of","inputs","and","data","samples","with","post-","processing","."]
code: def predict(
      self, inputs: torch.Tensor, data_samples: OptDetSampleList
  ) -> OptDetSampleList:
      """Predict results from a batch of inputs and data samples with post-
      processing."""
      inputs = self.extract_feat(inputs)
      data_samples = self.det_head.predict(inputs, data_samples)
      rec_data_samples = self.roi_head.predict(inputs, data_samples)
      return self.postprocessor(data_samples, rec_data_samples)
  
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 6 for calling the TwoStageTextSpotter obj's underlying member method code with example usage: obj.predict(inputs, data_samples) and returns: self