code: def getMask(self, image):
      preprocessedImage = self.processInput4(image)
      _, hairMask, faceMask = inference(
          net=self.net, img=preprocessedImage, device="cuda"
      )
      faceMask, hairMask = postProcess(faceMask, hairMask)
      return hairMask, faceMask
  
file_path: insightface/reconstruction/ostec/external/graphonomy/FaceHairMask/MaskExtractor.py
imports: import torch
  from PIL import Image
  from torchvision.transforms import transforms
  from FaceHairMask import deeplab_xception_transfer
  from FaceHairMask.graphonomy_inference import inference
  import numpy
  import cv2
label_desc: Use image node_id 3 for calling the MaskExtractor obj's underlying member method code with example usage: obj.getMask(image) and returns: hairMask,  faceMask