class_docstr: The class for implementing single stage text detector.
  
  Single-stage text detectors directly and densely predict bounding boxes or
  polygons on the output features of the backbone + neck (optional).
  
  Args:
      backbone (dict): Backbone config.
      neck (dict, optional): Neck config. If None, the output from backbone
          will be directly fed into ``det_head``.
      det_head (dict): Head config.
      data_preprocessor (dict, optional): Model preprocessing config
          for processing the input image data. Keys allowed are
          ``to_rgb``(bool), ``pad_size_divisor``(int), ``pad_value``(int or
          float), ``mean``(int or float) and ``std``(int or float).
          Preprcessing order: 1. to rgb; 2. normalization 3. pad.
          Defaults to None.
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to None.
docstr: Network forward process. Usually includes backbone, neck and head
  forward without any post-processing.
  
   Args:
      inputs (Tensor): Inputs with shape (N, C, H, W).
      data_samples (list[TextDetDataSample]): A list of N
          datasamples, containing meta information and gold annotations
          for each of the images.
  
  Returns:
      Tensor or tuple[Tensor]: A tuple of features from ``det_head``
      forward.
code: def _forward(
      self,
      inputs: torch.Tensor,
      data_samples: Optional[Sequence[TextDetDataSample]] = None,
      **kwargs,
  ) -> torch.Tensor:
      """Network forward process. Usually includes backbone, neck and head
      forward without any post-processing.
  
       Args:
          inputs (Tensor): Inputs with shape (N, C, H, W).
          data_samples (list[TextDetDataSample]): A list of N
              datasamples, containing meta information and gold annotations
              for each of the images.
  
      Returns:
          Tensor or tuple[Tensor]: A tuple of features from ``det_head``
          forward.
      """
      x = self.extract_feat(inputs)
      return self.det_head(x, data_samples)
  
file_path: mmocr/mmocr/models/textdet/detectors/single_stage_text_detector.py
imports: from typing import Dict, Optional, Sequence
  import torch
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
  from .base import BaseTextDetector
label_desc: Use image node_id 5 for calling the SingleStageTextDetector obj's underlying member method code with example usage: obj._forward(inputs, data_samples) and returns: self