Update model/cloth_masker.py
Browse files- model/cloth_masker.py +2 -2
model/cloth_masker.py
CHANGED
@@ -207,7 +207,7 @@ class AutoMasker:
|
|
207 |
schp_atr_mask = np.array(schp_atr_mask)
|
208 |
|
209 |
# Strong Protect Area (Hands, Face, Accessory, Feet)
|
210 |
-
if
|
211 |
hands_protect_area = part_mask_of(['hands',], densepose_mask, DENSE_INDEX_MAP)
|
212 |
else:
|
213 |
hands_protect_area = part_mask_of(['hands', 'feet'], densepose_mask, DENSE_INDEX_MAP)
|
@@ -225,7 +225,7 @@ class AutoMasker:
|
|
225 |
part_mask_of(['Hair'], schp_atr_mask, ATR_MAPPING)
|
226 |
cloth_protect_area = part_mask_of(PROTECT_CLOTH_PARTS[part]['LIP'], schp_lip_mask, LIP_MAPPING) | \
|
227 |
part_mask_of(PROTECT_CLOTH_PARTS[part]['ATR'], schp_atr_mask, ATR_MAPPING)
|
228 |
-
if
|
229 |
accessory_protect_area = part_mask_of((accessory_parts := ['Hat', 'Glove', 'Sunglasses', 'Bag', 'Scarf', 'Socks']), schp_lip_mask, LIP_MAPPING) | \
|
230 |
part_mask_of(accessory_parts, schp_atr_mask, ATR_MAPPING)
|
231 |
else:
|
|
|
207 |
schp_atr_mask = np.array(schp_atr_mask)
|
208 |
|
209 |
# Strong Protect Area (Hands, Face, Accessory, Feet)
|
210 |
+
if part == "overall":
|
211 |
hands_protect_area = part_mask_of(['hands',], densepose_mask, DENSE_INDEX_MAP)
|
212 |
else:
|
213 |
hands_protect_area = part_mask_of(['hands', 'feet'], densepose_mask, DENSE_INDEX_MAP)
|
|
|
225 |
part_mask_of(['Hair'], schp_atr_mask, ATR_MAPPING)
|
226 |
cloth_protect_area = part_mask_of(PROTECT_CLOTH_PARTS[part]['LIP'], schp_lip_mask, LIP_MAPPING) | \
|
227 |
part_mask_of(PROTECT_CLOTH_PARTS[part]['ATR'], schp_atr_mask, ATR_MAPPING)
|
228 |
+
if part == "overall":
|
229 |
accessory_protect_area = part_mask_of((accessory_parts := ['Hat', 'Glove', 'Sunglasses', 'Bag', 'Scarf', 'Socks']), schp_lip_mask, LIP_MAPPING) | \
|
230 |
part_mask_of(accessory_parts, schp_atr_mask, ATR_MAPPING)
|
231 |
else:
|