code: def preprocess(self, imgs, batch_size=1, input_size=320):
      input_datas = []
      for image in imgs:
          image = cv2.resize(image, (input_size, input_size))
          tmpImg = np.zeros((image.shape[0], image.shape[1], 3))
          image = image / np.max(image)
  
          tmpImg[:, :, 0] = (image[:, :, 0] - 0.485) / 0.229
          tmpImg[:, :, 1] = (image[:, :, 1] - 0.456) / 0.224
          tmpImg[:, :, 2] = (image[:, :, 2] - 0.406) / 0.225
  
          # convert BGR to RGB
          tmpImg = tmpImg.transpose((2, 0, 1))
          tmpImg = tmpImg[np.newaxis, :, :, :]
          input_datas.append(tmpImg)
  
      input_datas = np.concatenate(input_datas, 0)
  
      datas_num = input_datas.shape[0]
      split_num = (
          datas_num // batch_size + 1
          if datas_num % batch_size != 0
          else datas_num // batch_size
      )
  
      input_datas = np.array_split(input_datas, split_num)
  
      return input_datas
  
file_path: PaddleHub/modules/image/semantic_segmentation/U2Netp/processor.py
imports: import os
  import cv2
  import numpy
label_desc: Use image node_id 3 for calling the Processor obj's underlying member method code with example usage: obj.preprocess(imgs, batch_size, input_size) and returns: input_datas