Daniellesry commited on
Commit
5aade66
·
1 Parent(s): 7c16494
Files changed (3) hide show
  1. dkt/pipelines/pipeline.py +7 -3
  2. examples/16.mp4 +2 -2
  3. examples/17.mp4 +2 -2
dkt/pipelines/pipeline.py CHANGED
@@ -958,8 +958,12 @@ class DKTPipeline:
958
  cfg_scale=1.0,
959
  )
960
  print(f"[P4] main_pipe done, video length={len(video)}")
 
 
 
961
  torch.cuda.empty_cache()
962
 
 
963
  processed_video = video[:frame_length]
964
  processed_video = [resize_frame(frame, original_height, original_width) for frame in processed_video]
965
 
@@ -991,7 +995,7 @@ class DKTPipeline:
991
 
992
 
993
 
994
- if vis_pc and self.prompt == 'depth':
995
  vis_pc_num = 4
996
  indices = np.linspace(0, frame_length-1, vis_pc_num)
997
  indices = np.round(indices).astype(np.int32)
@@ -1001,7 +1005,8 @@ class DKTPipeline:
1001
  return_dict['rgb_frames'] = origin_frames
1002
 
1003
 
1004
- if get_moge_intrinsics:
 
1005
  demo_idx = 0
1006
  origin_frames_demo = origin_frames[demo_idx]
1007
  prediced_depth_map_np_demo = prediced_depth_map_np[demo_idx]
@@ -1016,7 +1021,6 @@ class DKTPipeline:
1016
  metric_depth, scale, shift = transfer_pred_disp2depth(prediced_depth_map_np_demo, moge_depth, moge_mask, return_scale_shift=True)
1017
 
1018
 
1019
-
1020
  moge_intrinsics[0, 0] *= original_width
1021
  moge_intrinsics[1, 1] *= original_height
1022
  moge_intrinsics[0, 2] *= original_width
 
958
  cfg_scale=1.0,
959
  )
960
  print(f"[P4] main_pipe done, video length={len(video)}")
961
+
962
+ del vae_outs
963
+ video = video.cpu()
964
  torch.cuda.empty_cache()
965
 
966
+
967
  processed_video = video[:frame_length]
968
  processed_video = [resize_frame(frame, original_height, original_width) for frame in processed_video]
969
 
 
995
 
996
 
997
 
998
+ if False and vis_pc and self.prompt == 'depth':
999
  vis_pc_num = 4
1000
  indices = np.linspace(0, frame_length-1, vis_pc_num)
1001
  indices = np.round(indices).astype(np.int32)
 
1005
  return_dict['rgb_frames'] = origin_frames
1006
 
1007
 
1008
+ if False and get_moge_intrinsics :
1009
+
1010
  demo_idx = 0
1011
  origin_frames_demo = origin_frames[demo_idx]
1012
  prediced_depth_map_np_demo = prediced_depth_map_np[demo_idx]
 
1021
  metric_depth, scale, shift = transfer_pred_disp2depth(prediced_depth_map_np_demo, moge_depth, moge_mask, return_scale_shift=True)
1022
 
1023
 
 
1024
  moge_intrinsics[0, 0] *= original_width
1025
  moge_intrinsics[1, 1] *= original_height
1026
  moge_intrinsics[0, 2] *= original_width
examples/16.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ca7cbbd94cf56db8d7f70e9e1092c9b69cb6c6a9799cb3e021a1f722553e978
3
- size 561537
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38266a7ec176347f3890a58881b8b4d388b607c5af05c97d14220224a9dda7b2
3
+ size 1140628
examples/17.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4919a4adbace8e8b4f6cdb481b73a342d099b1912392f71058d9cc36c6e1ad93
3
- size 689947
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5534789b249fb9050bc9eb4df11e6e14a7b6f14252937c5cce27104e16c9bf10
3
+ size 1211725