code: def __init__(self, config):
      algorithm = config["Predictor"]["algorithm"]
      assert algorithm in [
          "StyleTextRec"
      ], "Generator {} not supported.".format(algorithm)
      use_gpu = config["Global"]["use_gpu"]
      check_gpu(use_gpu)
      paddle.set_device("gpu" if use_gpu else "cpu")
      self.logger = get_logger()
      self.generator = getattr(style_text_rec, algorithm)(config)
      self.height = config["Global"]["image_height"]
      self.width = config["Global"]["image_width"]
      self.scale = config["Predictor"]["scale"]
      self.mean = config["Predictor"]["mean"]
      self.std = config["Predictor"]["std"]
      self.expand_result = config["Predictor"]["expand_result"]
  
file_path: PaddleOCR/StyleText/engine/predictors.py
imports: import numpy
  import cv2
  import math
  import paddle
  from arch import style_text_rec
  from utils.sys_funcs import check_gpu
  from utils.logging import get_logger
label_desc: Use image node_id 1 to create a new StyleTextRecPredictor object from inherited base classes: object with example: obj = StyleTextRecPredictor(config)