Muhammad Taqi Raza
commited on
Commit
·
7f5f48b
1
Parent(s):
2d59f81
comment changing resfunc
Browse files
inference/v2v_data/demo.py
CHANGED
@@ -117,8 +117,8 @@ class GetAnchorVideos:
|
|
117 |
frame_shape = vr[0].shape # (H, W, 3)
|
118 |
ori_resolution = frame_shape[:2]
|
119 |
print(f"==> original video shape: {frame_shape}")
|
120 |
-
target_resolution = get_center_crop_resolution(original_resoultion = ori_resolution, height = opts.height, width = opts.width)
|
121 |
-
print(f"==> target video shape resized: {target_resolution}")
|
122 |
|
123 |
prompt = self.get_caption(opts, opts.video_path)
|
124 |
depths = self.depth_estimater.infer(
|
@@ -138,8 +138,8 @@ class GetAnchorVideos:
|
|
138 |
print(f"==> opts video length: {opts.video_length}")
|
139 |
assert frames.shape[0] == opts.video_length
|
140 |
|
141 |
-
depths = center_crop_to_ratio(depths, resolution=target_resolution)
|
142 |
-
frames = center_crop_to_ratio(frames, resolution=target_resolution)
|
143 |
pose_s, pose_t, K = self.get_poses(opts, depths, num_frames=opts.video_length)
|
144 |
warped_images = []
|
145 |
masks = []
|
|
|
117 |
frame_shape = vr[0].shape # (H, W, 3)
|
118 |
ori_resolution = frame_shape[:2]
|
119 |
print(f"==> original video shape: {frame_shape}")
|
120 |
+
# target_resolution = get_center_crop_resolution(original_resoultion = ori_resolution, height = opts.height, width = opts.width)
|
121 |
+
# print(f"==> target video shape resized: {target_resolution}")
|
122 |
|
123 |
prompt = self.get_caption(opts, opts.video_path)
|
124 |
depths = self.depth_estimater.infer(
|
|
|
138 |
print(f"==> opts video length: {opts.video_length}")
|
139 |
assert frames.shape[0] == opts.video_length
|
140 |
|
141 |
+
# depths = center_crop_to_ratio(depths, resolution=target_resolution)
|
142 |
+
# frames = center_crop_to_ratio(frames, resolution=target_resolution)
|
143 |
pose_s, pose_t, K = self.get_poses(opts, depths, num_frames=opts.video_length)
|
144 |
warped_images = []
|
145 |
masks = []
|