Update app.py
Browse files
app.py
CHANGED
@@ -225,7 +225,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', blur_data
|
|
225 |
cv2.imwrite(f"f{count}_dmap.png", depth_color)
|
226 |
depth_frames.append(f"f{count}_dmap.png")
|
227 |
|
228 |
-
depth_gray = seg_frame(depth_gray)
|
229 |
|
230 |
cv2.imwrite(f"f{count}_mask.png", depth_gray)
|
231 |
masks.append(f"f{count}_mask.png")
|
@@ -602,7 +602,7 @@ def draw_mask(l, t, b, v, d, evt: gr.EventData):
|
|
602 |
x = points[len(points)-1][0]
|
603 |
y = points[len(points)-1][1]
|
604 |
|
605 |
-
mask = cv2.imread(masks[frame_selected], cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
606 |
mask[mask==128] = 0
|
607 |
d["layers"][0] = cv2.cvtColor(mask, cv2.COLOR_GRAY2RGBA)
|
608 |
|
|
|
225 |
cv2.imwrite(f"f{count}_dmap.png", depth_color)
|
226 |
depth_frames.append(f"f{count}_dmap.png")
|
227 |
|
228 |
+
depth_gray = seg_frame(depth_gray) + 128
|
229 |
|
230 |
cv2.imwrite(f"f{count}_mask.png", depth_gray)
|
231 |
masks.append(f"f{count}_mask.png")
|
|
|
602 |
x = points[len(points)-1][0]
|
603 |
y = points[len(points)-1][1]
|
604 |
|
605 |
+
mask = cv2.imread(masks[frame_selected], cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
606 |
mask[mask==128] = 0
|
607 |
d["layers"][0] = cv2.cvtColor(mask, cv2.COLOR_GRAY2RGBA)
|
608 |
|