docstr: Get the chinese texts in the predicted images.
  Args:
      images (list(numpy.ndarray)): images data, shape of each is [H, W, C]. If images not paths
      paths (list[str]): The paths of images. If paths not images
      use_gpu (bool): Whether to use gpu.
      batch_size(int): the program deals once with one
      output_dir (str): The directory to store output images.
      visualization (bool): Whether to save image or not.
      box_thresh(float): the threshold of the detected text box's confidence
      text_thresh(float): the threshold of the chinese text recognition confidence
      angle_classification_thresh(float): the threshold of the angle classification confidence
  
  Returns:
      res (list): The result of chinese texts and save path of images.
docstr_tok: ["Get","the","chinese","texts","in","the","predicted","images",".","Args",":","images","(","list","(","numpy.ndarray",")",")",":","images","data",",","shape","of","each","is","[","H",",","W",",","C","]",".","If","images","not","paths","paths","(","list","[","str","]",")",":","The","paths","of","images",".","If","paths","not","images","use_gpu","(","bool",")",":","Whether","to","use","gpu",".","batch_size","(","int",")",":","the","program","deals","once","with","one","output_dir","(","str",")",":","The","directory","to","store","output","images",".","visualization","(","bool",")",":","Whether","to","save","image","or","not",".","box_thresh","(","float",")",":","the","threshold","of","the","detected","text","box","'s","confidence","text_thresh","(","float",")",":","the","threshold","of","the","chinese","text","recognition","confidence","angle_classification_thresh","(","float",")",":","the","threshold","of","the","angle","classification","confidence","Returns",":","res","(","list",")",":","The","result","of","chinese","texts","and","save","path","of","images","."]
code: def recognize_text(
      self,
      images=[],
      paths=[],
      use_gpu=False,
      output_dir="ocr_result",
      visualization=False,
      box_thresh=0.5,
      text_thresh=0.5,
      angle_classification_thresh=0.9,
  ):
      """
      Get the chinese texts in the predicted images.
      Args:
          images (list(numpy.ndarray)): images data, shape of each is [H, W, C]. If images not paths
          paths (list[str]): The paths of images. If paths not images
          use_gpu (bool): Whether to use gpu.
          batch_size(int): the program deals once with one
          output_dir (str): The directory to store output images.
          visualization (bool): Whether to save image or not.
          box_thresh(float): the threshold of the detected text box's confidence
          text_thresh(float): the threshold of the chinese text recognition confidence
          angle_classification_thresh(float): the threshold of the angle classification confidence
  
      Returns:
          res (list): The result of chinese texts and save path of images.
      """
      if use_gpu:
          try:
              _places = os.environ["CUDA_VISIBLE_DEVICES"]
              int(_places[0])
          except:
              raise RuntimeError(
                  "Environment Variable CUDA_VISIBLE_DEVICES is not set correctly. If you wanna use gpu, please set CUDA_VISIBLE_DEVICES via export CUDA_VISIBLE_DEVICES=cuda_device_id."
              )
  
      self.use_gpu = use_gpu
  
      if images != [] and isinstance(images, list) and paths == []:
          predicted_data = images
      elif images == [] and isinstance(paths, list) and paths != []:
          predicted_data = self.read_images(paths)
      else:
          raise TypeError(
              "The input data is inconsistent with expectations."
          )
  
      assert (
          predicted_data != []
      ), "There is not any image to be predicted. Please check the input data."
  
      detection_results = self.text_detector_module.detect_text(
          images=predicted_data,
          use_gpu=self.use_gpu,
          box_thresh=box_thresh,
      )
  
      boxes = [
          np.array(item["data"]).astype(np.float32)
          for item in detection_results
      ]
      all_results = []
      for index, img_boxes in enumerate(boxes):
          original_image = predicted_data[index].copy()
          result = {"save_path": ""}
          if img_boxes.size == 0:
              result["data"] = []
          else:
              img_crop_list = []
              boxes = sorted_boxes(img_boxes)
              for num_box in range(len(boxes)):
                  tmp_box = copy.deepcopy(boxes[num_box])
                  img_crop = self.get_rotate_crop_image(
                      original_image, tmp_box
                  )
                  img_crop_list.append(img_crop)
              img_crop_list, angle_list = self._classify_text(
                  img_crop_list,
                  angle_classification_thresh=angle_classification_thresh,
              )
              rec_results = self._recognize_text(img_crop_list)
  
              # if the recognized text confidence score is lower than text_thresh, then drop it
              rec_res_final = []
              for index, res in enumerate(rec_results):
                  text, score = res
                  if score >= text_thresh:
                      rec_res_final.append(
                          {
                              "text": text,
                              "confidence": float(score),
                              "text_box_position": boxes[index]
                              .astype(np.int64)
                              .tolist(),
                          }
                      )
              result["data"] = rec_res_final
  
              if visualization and result["data"]:
                  result["save_path"] = self.save_result_image(
                      original_image,
                      boxes,
                      rec_results,
                      output_dir,
                      text_thresh,
                  )
          all_results.append(result)
  
      return all_results
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import ast
  import copy
  import math
  import os
  import time
  import cv2
  import numpy
  import paddle
  from chinese_ocr_db_crnn_server.character import CharacterOps
  from chinese_ocr_db_crnn_server.utils import base64_to_cv2
  from chinese_ocr_db_crnn_server.utils import draw_ocr
  from chinese_ocr_db_crnn_server.utils import get_image_ext
  from chinese_ocr_db_crnn_server.utils import sorted_boxes
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from PIL import Image
  import paddlehub
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
  from paddlehub.utils.log import logger
label_desc: Use image node_id 8 for calling the ChineseOCRDBCRNNServer obj's underlying member method code with example usage: obj.recognize_text(images, paths, use_gpu, output_dir, visualization, box_thresh, text_thresh, angle_classification_thresh) and returns: all_results