class_docstr: decode image 
class_docstr_tok: ["decode","image"]
code: def __call__(self, data):
      img = data["image"]
      if six.PY2:
          assert (
              type(img) is str and len(img) > 0
          ), "invalid input 'img' in DecodeImage"
      else:
          assert (
              type(img) is bytes and len(img) > 0
          ), "invalid input 'img' in DecodeImage"
      img = np.frombuffer(img, dtype="uint8")
      img = cv2.imdecode(img, 1)
      if img is None:
          return None
      if self.img_mode == "GRAY":
          img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
      elif self.img_mode == "RGB":
          assert img.shape[2] == 3, "invalid shape of image[%s]" % (
              img.shape
          )
          img = img[:, :, ::-1]
  
      if self.channel_first:
          img = img.transpose((2, 0, 1))
  
      data["image"] = img
      data["src_image"] = img
      return data
  
imports: import numpy
  import paddle
  import os
  import cv2
  import glob
label_desc: Use image node_id 2 for calling the DecodeImage obj's underlying member method code with example usage: obj.__call__(data) and returns: data, None