Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -409,8 +409,8 @@ def apply_mask(d, b):
|
|
409 |
mask = cv2.inRange(d["background"], np.array([255,255,255,255]), np.array([255,255,255,255]))
|
410 |
|
411 |
for k, mk in enumerate(masks):
|
412 |
-
if k != frame_selected:
|
413 |
-
masks[k] = cv2.imread(
|
414 |
masks[k][dmask==0] = (255,255,255)
|
415 |
|
416 |
masks[frame_selected] = d["background"]
|
|
|
409 |
mask = cv2.inRange(d["background"], np.array([255,255,255,255]), np.array([255,255,255,255]))
|
410 |
|
411 |
for k, mk in enumerate(masks):
|
412 |
+
if k != frame_selected and k < len(depths):
|
413 |
+
masks[k] = cv2.imread(depths[k]).astype(np.uint8)
|
414 |
masks[k][dmask==0] = (255,255,255)
|
415 |
|
416 |
masks[frame_selected] = d["background"]
|