code: def predict_text(self, img_list):
      img_num = len(img_list)
      # Calculate the aspect ratio of all text bars
      width_list = []
      for img in img_list:
          width_list.append(img.shape[1] / float(img.shape[0]))
      # Sorting can speed up the recognition process
      indices = np.argsort(np.array(width_list))
      rec_res = [["", 0.0]] * img_num
      batch_num = self.rec_batch_num
      st = time.time()
      for beg_img_no in range(0, img_num, batch_num):
          end_img_no = min(img_num, beg_img_no + batch_num)
          norm_img_batch = []
          imgC, imgH, imgW = self.rec_image_shape
          max_wh_ratio = imgW / imgH
          # max_wh_ratio = 0
          for ino in range(beg_img_no, end_img_no):
              h, w = img_list[indices[ino]].shape[0:2]
              wh_ratio = w * 1.0 / h
              max_wh_ratio = max(max_wh_ratio, wh_ratio)
          for ino in range(beg_img_no, end_img_no):
              norm_img = self.resize_norm_img(
                  img_list[indices[ino]], max_wh_ratio
              )
              norm_img = norm_img[np.newaxis, :]
              norm_img_batch.append(norm_img)
          norm_img_batch = np.concatenate(norm_img_batch)
          norm_img_batch = norm_img_batch.copy()
          if self.use_onnx:
              input_dict = {}
              input_dict[self.input_tensor.name] = norm_img_batch
              outputs = self.predictor.run(
                  self.output_tensors, input_dict
              )
              preds = outputs[0]
          else:
              self.input_tensor.copy_from_cpu(norm_img_batch)
              self.predictor.run()
              outputs = []
              for output_tensor in self.output_tensors:
                  output = output_tensor.copy_to_cpu()
                  outputs.append(output)
              if len(outputs) != 1:
                  preds = outputs
              else:
                  preds = outputs[0]
          rec_result = self.postprocess_op(preds)
          for rno in range(len(rec_result)):
              rec_res[indices[beg_img_no + rno]] = rec_result[rno]
      return rec_res, time.time() - st
  
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 3 for calling the TextRecognizer obj's underlying member method code with example usage: obj.predict_text(img_list) and returns: rec_res,  unknown