code: def cv2_to_base64(image: np.ndarray):
      data = cv2.imencode(".jpg", image)[1]
      return base64.b64encode(data.tostring()).decode("utf8")
  
file_path: PaddleHub/modules/image/instance_segmentation/solov2/data_feed.py
imports: import base64
  import cv2
  import numpy
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from paddle.inference import PrecisionType
  from PIL import Image
  from PIL import ImageDraw
label_desc: Use image node_id 9 for calling a global function with example usage: cv2_to_base64(image) and returns: base64