Spaces:
Running
Running
Update app.py
Browse files
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
|
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
|