patrickligardes commited on
Commit
d5ddcb4
β€’
1 Parent(s): 8ef9858

Update utils_mask.py

Browse files
Files changed (1) hide show
  1. utils_mask.py +2 -2
utils_mask.py CHANGED
@@ -86,11 +86,11 @@ def get_mask_location(model_type, category, model_parse: Image.Image, keypoint:
86
  parser_mask_changeable += np.logical_and(parse_array, np.logical_not(parser_mask_fixed))
87
 
88
  # Include leg parts for gap filling
89
- parse_mask = (parse_array == 12).astype(np.float32) + \
90
  (parse_array == 13).astype(np.float32)
91
 
92
  # Fill gaps between legs
93
- leg_mask = cv2.dilate(parse_mask.astype(np.uint8), np.ones((6, 6), np.uint8), iterations=6)
94
  parse_mask += leg_mask
95
 
96
  elif category == 'upper_body':
 
86
  parser_mask_changeable += np.logical_and(parse_array, np.logical_not(parser_mask_fixed))
87
 
88
  # Include leg parts for gap filling
89
+ parse_mask2 = (parse_array == 12).astype(np.float32) + \
90
  (parse_array == 13).astype(np.float32)
91
 
92
  # Fill gaps between legs
93
+ leg_mask = cv2.dilate(parse_mask2.astype(np.uint8), np.ones((6, 6), np.uint8), iterations=6)
94
  parse_mask += leg_mask
95
 
96
  elif category == 'upper_body':