Astridkraft commited on
Commit
683b165
·
verified ·
1 Parent(s): df8253c

Update controlnet_module.py

Browse files
Files changed (1) hide show
  1. controlnet_module.py +7 -0
controlnet_module.py CHANGED
@@ -622,6 +622,13 @@ class ControlNetProcessor:
622
  # 2. Dann Dilation für bessere Abdeckung
623
  kernel_dilate = np.ones((7,7), np.uint8)
624
  mask_array = cv2.dilate(mask_array, kernel_dilate, iterations=1)
 
 
 
 
 
 
 
625
 
626
  print(" ✅ MORPH_CLOSE füllt schwarze Löcher in der Person")
627
  print(" ✅ Dilation für bessere Personenabdeckung")
 
622
  # 2. Dann Dilation für bessere Abdeckung
623
  kernel_dilate = np.ones((7,7), np.uint8)
624
  mask_array = cv2.dilate(mask_array, kernel_dilate, iterations=1)
625
+
626
+ # Mittelstarker Blur für natürliche Übergänge:
627
+ cv2.GaussianBlur(mask_array, (9, 9), 2.0)
628
+
629
+ # Alternativen:
630
+ # Sanfter: (7, 7), 1.5 → subtiler Übergang
631
+ # Stärker: (11, 11), 2.5 → sehr weiche Übergänge
632
 
633
  print(" ✅ MORPH_CLOSE füllt schwarze Löcher in der Person")
634
  print(" ✅ Dilation für bessere Personenabdeckung")