Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,9 +52,8 @@ def process_frame(image):
|
|
52 |
depth_map = (depth_map - depth_map.min()) / (depth_map.max() - depth_map.min())
|
53 |
depth_map = (depth_map * 255).byte()
|
54 |
|
55 |
-
#
|
56 |
-
|
57 |
-
depth_map_colored = color_map[depth_map].view(96, 128, 3)
|
58 |
|
59 |
return cv2.cvtColor(depth_map_colored.cpu().numpy(), cv2.COLOR_BGR2RGB)
|
60 |
|
|
|
52 |
depth_map = (depth_map - depth_map.min()) / (depth_map.max() - depth_map.min())
|
53 |
depth_map = (depth_map * 255).byte()
|
54 |
|
55 |
+
# Apply color map
|
56 |
+
depth_map_colored = color_map[depth_map].squeeze()
|
|
|
57 |
|
58 |
return cv2.cvtColor(depth_map_colored.cpu().numpy(), cv2.COLOR_BGR2RGB)
|
59 |
|