class_docstr: MMOCR Text Detection Local Visualizer.
  
  Args:
      name (str): Name of the instance. Defaults to 'visualizer'.
      image (np.ndarray, optional): The origin image to draw. The format
          should be RGB. Defaults to None.
      vis_backends (list, optional): Visual backend config list.
          Defaults to None.
      save_dir (str, optional): Save file dir for all storage backends.
          If it is None, the backend storage will not save any data.
      gt_color (str or tuple[int, int, int]): Colors of GT text. The tuple of
          color should be in RGB order. Or using an abbreviation of color,
          such as `'g'` for `'green'`. Defaults to 'g'.
      pred_color (str or tuple[int, int, int]): Colors of Predicted text.
          The tuple of color should be in RGB order. Or using an abbreviation
          of color, such as `'r'` for `'red'`. Defaults to 'r'.
code: def __init__(
      self,
      name: str = "visualizer",
      image: Optional[np.ndarray] = None,
      vis_backends: Optional[Dict] = None,
      save_dir: Optional[str] = None,
      gt_color: Optional[Union[str, Tuple[int, int, int]]] = "g",
      pred_color: Optional[Union[str, Tuple[int, int, int]]] = "r",
      **kwargs,
  ) -> None:
      super().__init__(
          name=name,
          image=image,
          vis_backends=vis_backends,
          save_dir=save_dir,
          **kwargs,
      )
      self.gt_color = gt_color
      self.pred_color = pred_color
  
file_path: mmocr/mmocr/visualization/textrecog_visualizer.py
imports: from typing import Dict, Optional, Tuple, Union
  import cv2
  import mmcv
  import numpy
  from mmocr.registry import VISUALIZERS
  from mmocr.structures import TextRecogDataSample
  from .base_visualizer import BaseLocalVisualizer
label_desc: Use image node_id 1 to create a new TextRecogLocalVisualizer object from inherited base classes: BaseLocalVisualizer with example: obj = TextRecogLocalVisualizer(name, image, vis_backends, save_dir, gt_color, pred_color)