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