code: def cv2_to_base64(image: np.ndarray) -> str:
      """
      Convert data from BGR to base64 format.
      """
      data = cv2.imencode(".png", image)[1]
      return base64.b64encode(data.tostring()).decode("utf8")
  
file_path: PaddleHub/modules/image/semantic_segmentation/bisenet_lane_segmentation/processor.py
imports: import base64
  import collections.abc
  from itertools import combinations
  from typing import Union, List, Tuple, Callable
  import numpy
  import cv2
  import paddle
  import paddle.nn.functional
label_desc: Use image node_id 3 for calling a global function with example usage: cv2_to_base64(image) and returns: base64