devendergarg14 commited on
Commit
e01b37c
·
verified ·
1 Parent(s): 84538bc

Update SegCloth.py

Browse files
Files changed (1) hide show
  1. SegCloth.py +2 -1
SegCloth.py CHANGED
@@ -39,7 +39,8 @@ def segment_clothing(img, clothes):
39
  # Expand selected clothing masks using closing + dilation
40
  for mask in expand_mask_list:
41
  height, width = mask.shape
42
- kernel_size = max(1, int(0.02 * min(height, width))) # 5% expansion
 
43
  kernel = np.ones((kernel_size, kernel_size), np.uint8)
44
 
45
  # **Step 1: Fill gaps using Closing (Dilation + Erosion)**
 
39
  # Expand selected clothing masks using closing + dilation
40
  for mask in expand_mask_list:
41
  height, width = mask.shape
42
+ kernel_size = max(5, int(0.02 * min(height, width))) # 5% expansion
43
+ print(kernel_size)
44
  kernel = np.ones((kernel_size, kernel_size), np.uint8)
45
 
46
  # **Step 1: Fill gaps using Closing (Dilation + Erosion)**