class_docstr: The 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.
          Default 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.
      fig_save_cfg (dict): Keyword parameters of figure for saving.
          Defaults to empty dict.
      fig_show_cfg (dict): Keyword parameters of figure for showing.
          Defaults to empty dict.
      is_openset (bool, optional): Whether the visualizer is used in
          OpenSet. Defaults to False.
class_docstr_tok: ["The","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",".","Default","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",".","fig_save_cfg","(","dict",")",":","Keyword","parameters","of","figure","for","saving",".","Defaults","to","empty","dict",".","fig_show_cfg","(","dict",")",":","Keyword","parameters","of","figure","for","showing",".","Defaults","to","empty","dict",".","is_openset","(","bool",",","optional",")",":","Whether","the","visualizer","is","used","in","OpenSet",".","Defaults","to","False","."]
code: def __init__(
      self,
      name: str = "kie_visualizer",
      is_openset: bool = False,
      **kwargs,
  ) -> None:
      super().__init__(name=name, **kwargs)
      self.is_openset = is_openset
  
file_path: mmocr/mmocr/visualization/kie_visualizer.py
imports: import warnings
  from typing import Dict, List, Optional, Sequence, Union
  import mmcv
  import numpy
  import torch
  from matplotlib.collections import PatchCollection
  from matplotlib.patches import FancyArrow
  from mmengine.visualization import Visualizer
  from mmengine.visualization.utils import check_type, check_type_and_length, color_val_matplotlib, tensor2ndarray, value2list
  from mmocr.registry import VISUALIZERS
  from mmocr.structures import KIEDataSample
  from .base_visualizer import BaseLocalVisualizer
label_desc: Use image node_id 1 to create a new KIELocalVisualizer object from inherited base classes: BaseLocalVisualizer with example: obj = KIELocalVisualizer(name, is_openset)