Update controlnet_module.py
Browse files- controlnet_module.py +9 -9
controlnet_module.py
CHANGED
|
@@ -93,15 +93,15 @@ class ControlNetProcessor:
|
|
| 93 |
|
| 94 |
return int(x1), int(y1), int(x2), int(y2)
|
| 95 |
|
| 96 |
-
def _smooth_mask(self, mask_array, blur_radius=3):
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
|
| 106 |
|
| 107 |
def create_sam_mask(self, image, bbox_coords, mode):
|
|
|
|
| 93 |
|
| 94 |
return int(x1), int(y1), int(x2), int(y2)
|
| 95 |
|
| 96 |
+
#def _smooth_mask(self, mask_array, blur_radius=3):
|
| 97 |
+
# """Glättet die Maske für bessere Übergänge"""
|
| 98 |
+
# try:
|
| 99 |
+
# if blur_radius > 0:
|
| 100 |
+
# mask_array = cv2.medianBlur(mask_array, blur_radius*2+1)
|
| 101 |
+
# return mask_array
|
| 102 |
+
# except Exception as e:
|
| 103 |
+
# print(f"⚠️ Fehler beim Glätten der Maske: {e}")
|
| 104 |
+
# return mask_array
|
| 105 |
|
| 106 |
|
| 107 |
def create_sam_mask(self, image, bbox_coords, mode):
|