docstr: Get the text 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
      output_dir (str): The directory to store output images.
      visualization (bool): Whether to save image or not.
  Returns:
      res (list): The result of text detection box and save path of images.
docstr_tok: ["Get","the","text","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","output_dir","(","str",")",":","The","directory","to","store","output","images",".","visualization","(","bool",")",":","Whether","to","save","image","or","not",".","Returns",":","res","(","list",")",":","The","result","of","text","detection","box","and","save","path","of","images","."]
code: def recognize_text(
      self,
      images=[],
      paths=[],
      output_dir="ocr_result",
      visualization=False,
  ):
      """
      Get the text 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
          output_dir (str): The directory to store output images.
          visualization (bool): Whether to save image or not.
      Returns:
          res (list): The result of text detection box and save path of images.
      """
  
      if images != [] and isinstance(images, list) and paths == []:
          predicted_data = images
      elif images == [] and isinstance(paths, list) and paths != []:
          predicted_data = 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."
      all_results = []
      for img in predicted_data:
          result = {"save_path": ""}
          if img is None:
              result["data"] = []
              all_results.append(result)
              continue
          original_image = img.copy()
          rec_results = self.engine.ocr(
              img, det=self.det, rec=self.rec, cls=self.use_angle_cls
          )
          rec_res_final = []
          for line in rec_results:
              if self.det and self.rec:
                  boxes = line[0]
                  text, score = line[1]
                  rec_res_final.append(
                      {
                          "text": text,
                          "confidence": float(score),
                          "text_box_position": boxes,
                      }
                  )
              elif self.det and not self.rec:
                  boxes = line
                  rec_res_final.append({"text_box_position": boxes})
              else:
                  if self.use_angle_cls and not self.rec:
                      orientation, score = line
                      rec_res_final.append(
                          {
                              "orientation": orientation,
                              "score": float(score),
                          }
                      )
                  else:
                      text, score = line
                      rec_res_final.append(
                          {"text": text, "confidence": float(score)}
                      )
  
          result["data"] = rec_res_final
          if visualization and result["data"]:
              result["save_path"] = save_result_image(
                  original_image,
                  rec_results,
                  output_dir,
                  self.directory,
                  self.lang,
                  self.det,
                  self.rec,
                  self.logger,
              )
  
          all_results.append(result)
      return all_results
  
file_path: PaddleHub/modules/image/text_recognition/multi_languages_ocr_db_crnn/module.py
imports: import argparse
  import os
  import ast
  import paddle
  import paddle.static
  import paddle2onnx
  import paddle2onnx
  from paddleocr import PaddleOCR
  from paddleocr.ppocr.utils.logging import get_logger
  from paddleocr.tools.infer.utility import base64_to_cv2
  from paddlehub.module.module import moduleinfo, runnable, serving
  from .utils import read_images, save_result_image, mkdir
label_desc: Use image node_id 2 for calling the MultiLangOCR obj's underlying member method code with example usage: obj.recognize_text(images, paths, output_dir, visualization) and returns: all_results