code: def run(self, image):
      image = Image.fromarray(image)
      face = futils.dlib.detect(image)
  
      if not face:
          return
      face_on_image = face[0]
      image, face, crop_face = futils.dlib.crop(
          image,
          face_on_image,
          self.up_ratio,
          self.down_ratio,
          self.width_ratio,
      )
      np_image = np.array(image)
      mask = self.face_parser.parse(
          np.float32(cv2.resize(np_image, self.input_size))
      )
      mask = cv2.resize(mask.numpy(), (256, 256))
      mask = mask.astype(np.uint8)
      mask = mask2image(mask)
  
      return mask
  
file_path: PaddleHub/modules/image/Image_gan/style_transfer/face_parse/model.py
imports: import os
  import sys
  import argparse
  from PIL import Image
  import numpy
  import cv2
  import ppgan.faceutils
  from ppgan.utils.preprocess import *
  from ppgan.utils.visual import mask2image
label_desc: Use image node_id 2 for calling the FaceParsePredictor obj's underlying member method code with example usage: obj.run(image) and returns: mask