code: def cv2_to_base64(image):
      data = cv2.imencode(".jpg", image)[1]
      return base64.b64encode(data.tostring()).decode("utf8")
  
file_path: PaddleHub/modules/image/semantic_segmentation/deeplabv3p_xception65_humanseg/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import time
  import base64
  import cv2
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: cv2_to_base64(image) and returns: base64