code: def preprocess(self, input_dicts, data_id, log_id):
      ((_, input_dict),) = input_dicts.items()
      data = base64.b64decode(input_dict["image"].encode("utf8"))
      self.raw_im = data
      data = np.fromstring(data, np.uint8)
      # Note: class variables(self.var) can only be used in process op mode
      im = cv2.imdecode(data, cv2.IMREAD_COLOR)
      self.ori_h, self.ori_w, _ = im.shape
      det_img = self.det_preprocess(im)
      _, self.new_h, self.new_w = det_img.shape
      return {"x": det_img[np.newaxis, :].copy()}, False, None, ""
  
file_path: PaddleOCR/deploy/pdserving/web_service_det.py
imports: from paddle_serving_server.web_service import WebService, Op
  import logging
  import numpy
  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 DetOp obj's underlying member method code with example usage: obj.preprocess(input_dicts, data_id, log_id) and returns: dict,  False,  None,  str