freealise commited on
Commit
5b248df
1 Parent(s): a1161ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -434,7 +434,7 @@ def draw_mask(l, t, v, d, evt: gr.EventData):
434
  #for i in range(l):
435
  # bg[(bg >= i*255/l) & (bg < (i+1)*255/l)] = i*255/(l-1)
436
  bg = cv2.convertScaleAbs(palette[bg]).astype(np.uint8) # Converting image back to uint
437
- bg[mask>0 or bg==255] = 254
438
 
439
  params["fnum"] = frame_selected
440
  params["l"] = l
 
434
  #for i in range(l):
435
  # bg[(bg >= i*255/l) & (bg < (i+1)*255/l)] = i*255/(l-1)
436
  bg = cv2.convertScaleAbs(palette[bg]).astype(np.uint8) # Converting image back to uint
437
+ bg[(mask>0) | (bg==255)] = 254
438
 
439
  params["fnum"] = frame_selected
440
  params["l"] = l