code: def preprocess(self, input_dicts, data_id, log_id):
      ((_, input_dict),) = input_dicts.items()
      data = base64.b64decode(input_dict["image"])
      data = np.frombuffer(data, np.uint8)
      # Note: class variables(self.var) can only be used in process op mode
      img = cv2.imdecode(data, cv2.IMREAD_COLOR)
      img = cv2.resize(img, (112, 112))
      # normalize to mean 0.5, std 0.5
      img = (img - 127.5) * 0.00784313725
      # BGR2RGB
      img = img[:, :, ::-1]
      img = img.transpose((2, 0, 1))
      img = np.expand_dims(img, 0)
      img = img.astype("float32")
      return {"x": img.copy()}, False, None, ""
  
file_path: insightface/recognition/arcface_paddle/deploy/pdserving/web_service.py
imports: from paddle_serving_server.web_service import WebService, Op
  import numpy
  import cv2
  import base64
label_desc: Use image node_id 2 for calling the ArcFaceOp obj's underlying member method code with example usage: obj.preprocess(input_dicts, data_id, log_id) and returns: dict,  False,  None,  str