Muhammad Taqi Raza commited on
Commit
95687fc
·
1 Parent(s): 366a2ee

adding depth visualization

Browse files
Files changed (1) hide show
  1. gradio_app.py +1 -1
gradio_app.py CHANGED
@@ -47,7 +47,7 @@ def visualize_depth_npy_as_video(npy_file):
47
  out = cv2.VideoWriter(video_path, fourcc, 10, (W, H)) # 10 FPS
48
 
49
  for i in range(T):
50
- frame = cropped[i, 0].numpy()
51
  norm = (frame - frame.min()) / (frame.max() - frame.min() + 1e-8)
52
  frame_uint8 = (norm * 255).astype(np.uint8)
53
  colored = cv2.applyColorMap(frame_uint8, cv2.COLORMAP_INFERNO)
 
47
  out = cv2.VideoWriter(video_path, fourcc, 10, (W, H)) # 10 FPS
48
 
49
  for i in range(T):
50
+ frame = tensor[i, 0].numpy()
51
  norm = (frame - frame.min()) / (frame.max() - frame.min() + 1e-8)
52
  frame_uint8 = (norm * 255).astype(np.uint8)
53
  colored = cv2.applyColorMap(frame_uint8, cv2.COLORMAP_INFERNO)