Spaces:
Running
Running
thr3a
commited on
Commit
•
bad4452
1
Parent(s):
25c148e
update:
Browse files
app.py
CHANGED
@@ -25,7 +25,9 @@ def rmbg_fn(img):
|
|
25 |
mask = get_mask(img)
|
26 |
img = (mask * img + 255 * (1 - mask)).astype(np.uint8)
|
27 |
mask = (mask * 255).astype(np.uint8)
|
28 |
-
img =
|
|
|
|
|
29 |
mask = mask.repeat(3, axis=2)
|
30 |
return mask, img
|
31 |
|
|
|
25 |
mask = get_mask(img)
|
26 |
img = (mask * img + 255 * (1 - mask)).astype(np.uint8)
|
27 |
mask = (mask * 255).astype(np.uint8)
|
28 |
+
img = (mask * img + (1 - mask) * 255).astype(np.uint8)
|
29 |
+
# img = np.concatenate([img, mask], axis=2, dtype=np.uint8)
|
30 |
+
mask = (mask * 255).astype(np.uint8)
|
31 |
mask = mask.repeat(3, axis=2)
|
32 |
return mask, img
|
33 |
|