code: def preprocess(self, input_dicts, data_id, log_id):
      ((_, input_dict),) = input_dicts.items()
      raw_im = input_dict["image"]
      data = np.frombuffer(raw_im, np.uint8)
      im = cv2.imdecode(data, cv2.IMREAD_COLOR)
      self.dt_list = input_dict["dt_boxes"]
      self.dt_list = self.sorted_boxes(self.dt_list)
      # deepcopy to save origin dt_boxes
      dt_boxes = copy.deepcopy(self.dt_list)
      feed_list = []
      img_list = []
      max_wh_ratio = 320 / 48.0
      ## Many mini-batchs, the type of feed_data is list.
      max_batch_size = 6  # len(dt_boxes)
  
      # If max_batch_size is 0, skipping predict stage
      if max_batch_size == 0:
          return {}, True, None, ""
      boxes_size = len(dt_boxes)
      batch_size = boxes_size // max_batch_size
      rem = boxes_size % max_batch_size
      for bt_idx in range(0, batch_size + 1):
          imgs = None
          boxes_num_in_one_batch = 0
          if bt_idx == batch_size:
              if rem == 0:
                  continue
              else:
                  boxes_num_in_one_batch = rem
          elif bt_idx < batch_size:
              boxes_num_in_one_batch = max_batch_size
          else:
              _LOGGER.error(
                  "batch_size error, bt_idx={}, batch_size={}".format(
                      bt_idx, batch_size
                  )
              )
              break
  
          start = bt_idx * max_batch_size
          end = start + boxes_num_in_one_batch
          img_list = []
          for box_idx in range(start, end):
              boximg = self.get_rotate_crop_image(im, dt_boxes[box_idx])
              img_list.append(boximg)
              h, w = boximg.shape[0:2]
              wh_ratio = w * 1.0 / h
              max_wh_ratio = max(max_wh_ratio, wh_ratio)
          _, w, h = self.ocr_reader.resize_norm_img(
              img_list[0], max_wh_ratio
          ).shape
  
          imgs = np.zeros((boxes_num_in_one_batch, 3, w, h)).astype(
              "float32"
          )
          for id, img in enumerate(img_list):
              norm_img = self.ocr_reader.resize_norm_img(
                  img, max_wh_ratio
              )
              imgs[id] = norm_img
          feed = {"x": imgs.copy()}
          feed_list.append(feed)
      return feed_list, False, None, ""
  
imports: from paddle_serving_server.web_service import WebService, Op
  import logging
  import numpy
  import copy
  import cv2
  import base64
  from ocr_reader import OCRReader, DetResizeForTest, ArgsParser
  from paddle_serving_app.reader import Sequential, ResizeByFactor
  from paddle_serving_app.reader import Div, Normalize, Transpose
  from paddle_serving_app.reader import DBPostProcess, FilterBoxes, GetRotateCropImage, SortedBoxes
label_desc: Use image node_id 2 for calling the RecOp obj's underlying member method code with example usage: obj.preprocess(input_dicts, data_id, log_id) and returns: feed_list,  False,  None,  str, dict,  True,  None,  str