class_docstr: Simplest base roi head including one bbox head and one mask head.
code: def predict(
      self, inputs: Tuple[Tensor], data_samples: DetSampleList
  ) -> RecSampleList:
      if hasattr(self, "neck") and self.neck is not None:
          inputs = self.neck(inputs)
      pred_instances = [ds.pred_instances for ds in data_samples]
      bbox_feats = self.roi_extractor(inputs, pred_instances)
      if bbox_feats.size(0) == 0:
          return []
      len_instance = sum(
          [len(instance_data) for instance_data in pred_instances]
      )
      rec_data_samples = [
          TextRecogDataSample() for _ in range(len_instance)
      ]
      rec_data_samples = self.rec_head.predict(
          bbox_feats, rec_data_samples
      )
      return rec_data_samples
  
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 3 for calling the RecRoIHead obj's underlying member method code with example usage: obj.predict(inputs, data_samples) and returns: rec_data_samples, list