freealise commited on
Commit
83d1447
1 Parent(s): df5eae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -269,7 +269,7 @@ def get_mesh(image, depth, blur_data, loadall):
269
  #print(image[fnum][0])
270
  #print(depth["composite"])
271
 
272
- depthc = cv2.cvtColor(depth["composite"], cv2.COLOR_RGBA2RGB)
273
  blur_img = blur_image(image[fnum][0], depthc, blur_data)
274
  gdepth = rgb2gray(depthc)
275
 
@@ -429,6 +429,7 @@ def draw_mask(f, l, c, k, v, d, evt: gr.EventData):
429
  mask[cv2.inRange(grad, 1, 255)>0] = 1
430
 
431
  d["layers"][1][mask>0] = (0,0,0,255)
 
432
 
433
  return gr.ImageEditor(value=d)
434
 
 
269
  #print(image[fnum][0])
270
  #print(depth["composite"])
271
 
272
+ depthc = cv2.cvtColor(depth["background"], cv2.COLOR_RGBA2RGB)
273
  blur_img = blur_image(image[fnum][0], depthc, blur_data)
274
  gdepth = rgb2gray(depthc)
275
 
 
429
  mask[cv2.inRange(grad, 1, 255)>0] = 1
430
 
431
  d["layers"][1][mask>0] = (0,0,0,255)
432
+ d["background"][mask>0] = (0,0,0,255)
433
 
434
  return gr.ImageEditor(value=d)
435