Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -177,9 +177,7 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits', remove_bg
|
|
177 |
|
178 |
#
|
179 |
depth = predict_depth(raw_frame[:, :, ::-1], model)
|
180 |
-
|
181 |
-
depth_color = depth.astype(np.uint8)
|
182 |
-
depth_gray = cv2.cvtColor(depth_color, cv2.COLOR_RGBA2GRAY)
|
183 |
#
|
184 |
|
185 |
#depth = to_tensor_transform(predict_depth(depth_anything, frame_pil))
|
|
|
177 |
|
178 |
#
|
179 |
depth = predict_depth(raw_frame[:, :, ::-1], model)
|
180 |
+
depth_gray = ((depth - depth.min()) / (depth.max() - depth.min()) * 255.0).astype(np.uint8)
|
|
|
|
|
181 |
#
|
182 |
|
183 |
#depth = to_tensor_transform(predict_depth(depth_anything, frame_pil))
|