Spaces:
Running
on
Zero
Running
on
Zero
patrickligardes
commited on
Commit
β’
cbfe751
1
Parent(s):
97b1990
Update utils_mask.py
Browse files- utils_mask.py +2 -3
utils_mask.py
CHANGED
@@ -81,9 +81,7 @@ def get_mask_location(model_type, category, model_parse: Image.Image, keypoint:
|
|
81 |
if category == 'dresses':
|
82 |
# Initial dress mask for the upper body
|
83 |
parse_mask_upper = np.logical_or((parse_array == label_map["upper_clothes"]), (parse_array == label_map["dress"])).astype(np.float32)
|
84 |
-
|
85 |
-
(parse_array == label_map["pants"]).astype(np.float32)
|
86 |
-
parser_mask_fixed += parser_mask_fixed_lower_cloth
|
87 |
|
88 |
# Create a mask for the legs (including skirts and pants)
|
89 |
parse_mask_legs = np.logical_or.reduce((parse_array == label_map["skirt"],
|
@@ -97,6 +95,7 @@ def get_mask_location(model_type, category, model_parse: Image.Image, keypoint:
|
|
97 |
# Combine the upper body mask with the dilated leg mask
|
98 |
parse_mask = np.maximum(parse_mask_upper, parse_mask_legs_dilated)
|
99 |
|
|
|
100 |
|
101 |
|
102 |
|
|
|
81 |
if category == 'dresses':
|
82 |
# Initial dress mask for the upper body
|
83 |
parse_mask_upper = np.logical_or((parse_array == label_map["upper_clothes"]), (parse_array == label_map["dress"])).astype(np.float32)
|
84 |
+
|
|
|
|
|
85 |
|
86 |
# Create a mask for the legs (including skirts and pants)
|
87 |
parse_mask_legs = np.logical_or.reduce((parse_array == label_map["skirt"],
|
|
|
95 |
# Combine the upper body mask with the dilated leg mask
|
96 |
parse_mask = np.maximum(parse_mask_upper, parse_mask_legs_dilated)
|
97 |
|
98 |
+
|
99 |
|
100 |
|
101 |
|