freealise commited on
Commit
96da75a
1 Parent(s): 17d2c04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(f"f{k}_dmap.png").astype(np.uint8)
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"]