class_docstr: Base class for encode-decode text spotter.
  
  Args:
      preprocessor (dict, optional): Config dict for preprocessor. Defaults
          to None.
      backbone (dict, optional): Backbone config. Defaults to None.
      encoder (dict, optional): Encoder config. If None, the output from
          backbone will be directly fed into ``decoder``. Defaults to None.
      decoder (dict, optional): Decoder config. Defaults to None.
      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.
code: def __init__(
      self,
      preprocessor: OptConfigType = None,
      backbone: OptConfigType = None,
      encoder: OptConfigType = None,
      decoder: OptConfigType = None,
      data_preprocessor: ConfigType = None,
      init_cfg: InitConfigType = None,
  ) -> None:
      super().__init__(
          init_cfg=init_cfg, data_preprocessor=data_preprocessor
      )
  
      # Preprocessor module, e.g., TPS
      if preprocessor is not None:
          self.preprocessor = MODELS.build(preprocessor)
  
      # Backbone
      if backbone is not None:
          self.backbone = MODELS.build(backbone)
  
      # Encoder module
      if encoder is not None:
          self.encoder = MODELS.build(encoder)
  
      # Decoder module
      assert decoder is not None
      self.decoder = MODELS.build(decoder)
  
file_path: mmocr/projects/SPTS/spts/model/encoder_decoder_text_spotter.py
imports: from typing import Dict
  import torch
  from mmocr.registry import MODELS
  from mmocr.utils.typing_utils import ConfigType, InitConfigType, OptConfigType, OptRecSampleList, RecForwardResults, RecSampleList
  from .base_text_spotter import BaseTextSpotter
label_desc: Use image node_id 1 to create a new EncoderDecoderTextSpotter object from inherited base classes: BaseTextSpotter with example: obj = EncoderDecoderTextSpotter(preprocessor, backbone, encoder, decoder, data_preprocessor, init_cfg)