code: def __init__(self, args, cfg, use_gpu=True):
      self.rec_image_shape = cfg["rec_image_shape"]
      self.rec_batch_num = cfg["rec_batch_num"]
      word_dict_path = cfg["word_dict_path"]
      use_space_char = True
  
      postprocess_params = {
          "name": "CTCLabelDecode",
          "character_dict_path": word_dict_path,
          "use_space_char": use_space_char,
      }
      self.postprocess_op = build_post_process(postprocess_params)
      (
          self.predictor,
          self.input_tensor,
          self.output_tensors,
          self.config,
      ) = create_predictor(args, cfg, "rec")
      self.use_onnx = False
  
imports: import os
  import yaml
  import glob
  from functools import reduce
  import time
  import cv2
  import numpy
  import math
  import paddle
  import sys
  from python.infer import get_test_images
  from python.preprocess import preprocess, NormalizeImage, Permute, Resize_Mult32
  from pipeline.ppvehicle.vehicle_plateutils import create_predictor, get_infer_gpuid, get_rotate_crop_image, draw_boxes
  from pipeline.ppvehicle.vehicleplate_postprocess import build_post_process
  from pipeline.cfg_utils import merge_cfg, print_arguments, argsparser
label_desc: Use image node_id 1 to create a new TextRecognizer object from inherited base classes: object with example: obj = TextRecognizer(args, cfg, use_gpu)