parameters: (out, input_shape)
return_statement: return raw_output_all
docstring: Create a grayscale human segmentation
      :param out: network output
      :param input_shape: input image width and height
docstring_summary: Create a grayscale human segmentation
      :param out: network output
      :param input_shape: input image width and height
docstring_tokens: Create a grayscale human segmentation : param out : network output : param input_shape : input image width and height
function: def postprocess(out, input_shape):
      """
      Create a grayscale human segmentation
      :param out: network output
      :param input_shape: input image width and height
      """
      # LIP classes
      # 0 Background
      # 1 Hat
      # 2 Hair
      # 3 Glove
      # 4 Sunglasses
      # 5 UpperClothes
      # 6 Dress
      # 7 Coat
      # 8 Socks
      # 9 Pants
      # 10 Jumpsuits
      # 11 Scarf
      # 12 Skirt
      # 13 Face
      # 14 LeftArm
      # 15 RightArm
      # 16 LeftLeg
      # 17 RightLeg
      # 18 LeftShoe
      # 19 RightShoe
      head_output, tail_output = np.split(out, indices_or_sections=[1], axis=0)
      head_output = head_output.squeeze(0)
      tail_output = tail_output.squeeze(0)
  
      head_output = np.stack([cv.resize(img, dsize=input_shape) for img in head_output[:, ...]])
      tail_output = np.stack([cv.resize(img, dsize=input_shape) for img in tail_output[:, ...]])
  
      tail_list = np.split(tail_output, indices_or_sections=list(range(1, 20)), axis=0)
      tail_list = [arr.squeeze(0) for arr in tail_list]
      tail_list_rev = [tail_list[i] for i in range(14)]
      tail_list_rev.extend([tail_list[15], tail_list[14], tail_list[17], tail_list[16], tail_list[19], tail_list[18]])
      tail_output_rev = np.stack(tail_list_rev, axis=0)
      tail_output_rev = np.flip(tail_output_rev, axis=2)
      raw_output_all = np.mean(np.stack([head_output, tail_output_rev], axis=0), axis=0, keepdims=True)
      raw_output_all = np.argmax(raw_output_all, axis=1)
      raw_output_all = raw_output_all.transpose(1, 2, 0)
      return raw_output_all
function_tokens: def postprocess ( out , input_shape ) : # LIP classes # 0 Background # 1 Hat # 2 Hair # 3 Glove # 4 Sunglasses # 5 UpperClothes # 6 Dress # 7 Coat # 8 Socks # 9 Pants # 10 Jumpsuits # 11 Scarf # 12 Skirt # 13 Face # 14 LeftArm # 15 RightArm # 16 LeftLeg # 17 RightLeg # 18 LeftShoe # 19 RightShoe head_output , tail_output = np . split ( out , indices_or_sections = [ 1 ] , axis = 0 ) head_output = head_output . squeeze ( 0 ) tail_output = tail_output . squeeze ( 0 ) head_output = np . stack ( [ cv . resize ( img , dsize = input_shape ) for img in head_output [ : , ... ] ] ) tail_output = np . stack ( [ cv . resize ( img , dsize = input_shape ) for img in tail_output [ : , ... ] ] ) tail_list = np . split ( tail_output , indices_or_sections = list ( range ( 1 , 20 ) ) , axis = 0 ) tail_list = [ arr . squeeze ( 0 ) for arr in tail_list ] tail_list_rev = [ tail_list [ i ] for i in range ( 14 ) ] tail_list_rev . extend ( [ tail_list [ 15 ] , tail_list [ 14 ] , tail_list [ 17 ] , tail_list [ 16 ] , tail_list [ 19 ] , tail_list [ 18 ] ] ) tail_output_rev = np . stack ( tail_list_rev , axis = 0 ) tail_output_rev = np . flip ( tail_output_rev , axis = 2 ) raw_output_all = np . mean ( np . stack ( [ head_output , tail_output_rev ] , axis = 0 ) , axis = 0 , keepdims = True ) raw_output_all = np . argmax ( raw_output_all , axis = 1 ) raw_output_all = raw_output_all . transpose ( 1 , 2 , 0 ) return raw_output_all