Spaces:
Runtime error
Runtime error
bugfix
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ def image_matting(
|
|
70 |
|
71 |
alpha = (alpha * 255).astype(np.uint8)
|
72 |
kernel = np.ones((5, 5), np.uint8)
|
73 |
-
if morph_op == "
|
74 |
alpha = cv2.dilate(alpha, kernel, iterations=int(morph_op_factor))
|
75 |
else:
|
76 |
alpha = cv2.erode(alpha, kernel, iterations=int(morph_op_factor))
|
|
|
70 |
|
71 |
alpha = (alpha * 255).astype(np.uint8)
|
72 |
kernel = np.ones((5, 5), np.uint8)
|
73 |
+
if morph_op == "Dilate":
|
74 |
alpha = cv2.dilate(alpha, kernel, iterations=int(morph_op_factor))
|
75 |
else:
|
76 |
alpha = cv2.erode(alpha, kernel, iterations=int(morph_op_factor))
|