class_docstr: Load the image in Inferencer's pipeline.
  
  Modified Keys:
  
  - img
  - img_path
  - img_shape
  - ori_shape
  
  Args:
      to_float32 (bool): Whether to convert the loaded image to a float32
          numpy array. If set to False, the loaded image is an uint8 array.
          Defaults to False.
docstr: Transform function to add image meta information.
  
  Args:
      single_input (str or dict or np.ndarray): The raw input from
          inferencer.
  
  Returns:
      dict: The dict contains loaded image and meta information.
docstr_tok: ["Transform","function","to","add","image","meta","information",".","Args",":","single_input","(","str","or","dict","or","np.ndarray",")",":","The","raw","input","from","inferencer",".","Returns",":","dict",":","The","dict","contains","loaded","image","and","meta","information","."]
code: def transform(
      self, single_input: Union[str, np.ndarray, dict]
  ) -> dict:
      """Transform function to add image meta information.
  
      Args:
          single_input (str or dict or np.ndarray): The raw input from
              inferencer.
  
      Returns:
          dict: The dict contains loaded image and meta information.
      """
      if isinstance(single_input, str):
          inputs = dict(img_path=single_input)
      elif isinstance(single_input, np.ndarray):
          inputs = dict(img=single_input)
      elif isinstance(single_input, dict):
          inputs = single_input
      else:
          raise NotImplementedError
  
      if "img" in inputs:
          return self.from_ndarray(inputs)
  
      return self.from_file(inputs)
  
imports: import copy
  import warnings
  from typing import Optional, Union
  import mmcv
  import mmengine.fileio
  import numpy
  from mmcv.transforms import BaseTransform
  from mmcv.transforms import LoadAnnotations
  from mmcv.transforms import LoadImageFromFile
  from mmocr.registry import TRANSFORMS
label_desc: Use image node_id 2 for calling the InferencerLoader obj's underlying member method code with example usage: obj.transform(single_input) and returns: self, self