Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -382,8 +382,8 @@ def draw_mask(l, c, k, v, d, evt: gr.EventData):
|
|
382 |
delta = 0
|
383 |
ddepth = cv2.CV_16S
|
384 |
|
385 |
-
if edge ==
|
386 |
-
if edge
|
387 |
d["background"] = cv2.imread(masks[frame_selected]).astype(np.uint8)
|
388 |
|
389 |
bg = cv2.cvtColor(d["background"], cv2.COLOR_RGBA2GRAY)
|
|
|
382 |
delta = 0
|
383 |
ddepth = cv2.CV_16S
|
384 |
|
385 |
+
if len(edge) == 0 or params["fnum"] != frame_selected or params["l"] != l or params["c"] != c or params["k"] != k:
|
386 |
+
if len(edge) > 0:
|
387 |
d["background"] = cv2.imread(masks[frame_selected]).astype(np.uint8)
|
388 |
|
389 |
bg = cv2.cvtColor(d["background"], cv2.COLOR_RGBA2GRAY)
|