class_docstr: Load an image from file.
  
  Required Keys:
  
  - img_path
  
  Modified Keys:
  
  - img
  - 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.
      color_type (str): The flag argument for :func:``mmcv.imfrombytes``.
          Defaults to 'color'.
      imdecode_backend (str): The image decoding backend type. The backend
          argument for :func:``mmcv.imfrombytes``.
          See :func:``mmcv.imfrombytes`` for details.
          Defaults to 'cv2'.
      file_client_args (dict): Arguments to instantiate a FileClient.
          See :class:`mmengine.fileio.FileClient` for details.
          Defaults to None. It will be deprecated in future. Please use
          ``backend_args`` instead.
          Deprecated in version 1.0.0rc6.
      backend_args (dict, optional): Instantiates the corresponding file
          backend. It may contain `backend` key to specify the file
          backend. If it contains, the file backend corresponding to this
          value will be used and initialized with the remaining values,
          otherwise the corresponding file backend will be selected
          based on the prefix of the file path. Defaults to None.
          New in version 1.0.0rc6.
      ignore_empty (bool): Whether to allow loading empty image or file path
          not existent. Defaults to False.
      min_size (int): The minimum size of the image to be loaded. If the
          image is smaller than the minimum size, it will be regarded as a
          broken image. Defaults to 0.
code: def __init__(
      self,
      to_float32: bool = False,
      color_type: str = "color",
      imdecode_backend: str = "cv2",
      file_client_args: Optional[dict] = None,
      min_size: int = 0,
      ignore_empty: bool = False,
      *,
      backend_args: Optional[dict] = None,
  ) -> None:
      self.ignore_empty = ignore_empty
      self.to_float32 = to_float32
      self.color_type = color_type
      self.imdecode_backend = imdecode_backend
      self.min_size = min_size
      self.file_client_args = file_client_args
      self.backend_args = backend_args
      if file_client_args is not None:
          warnings.warn(
              '"file_client_args" will be deprecated in future. '
              'Please use "backend_args" instead',
              DeprecationWarning,
          )
          if backend_args is not None:
              raise ValueError(
                  '"file_client_args" and "backend_args" cannot be set '
                  "at the same time."
              )
  
          self.file_client_args = file_client_args.copy()
      if backend_args is not None:
          self.backend_args = backend_args.copy()
  
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 1 to create a new LoadImageFromFile object from inherited base classes: MMCV_LoadImageFromFile with example: obj = LoadImageFromFile(to_float32, color_type, imdecode_backend, file_client_args, min_size, ignore_empty)