Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,6 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
114 |
if not ret:
|
115 |
break
|
116 |
|
117 |
-
orig_frames.append(raw_frame)
|
118 |
frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB) / 255.0
|
119 |
frame_pil = Image.fromarray((frame * 255).astype(np.uint8))
|
120 |
frame = transform({'image': frame})['image']
|
@@ -147,8 +146,12 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
147 |
# out.write(combined_frame)
|
148 |
# frame_path = os.path.join(temp_frame_dir, f"frame_{count:05d}.png")
|
149 |
# cv2.imwrite(frame_path, combined_frame)
|
150 |
-
cv2.
|
151 |
-
|
|
|
|
|
|
|
|
|
152 |
count += 1
|
153 |
|
154 |
final_vid = create_video(depth_frames, frame_rate, "depth")
|
|
|
114 |
if not ret:
|
115 |
break
|
116 |
|
|
|
117 |
frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB) / 255.0
|
118 |
frame_pil = Image.fromarray((frame * 255).astype(np.uint8))
|
119 |
frame = transform({'image': frame})['image']
|
|
|
146 |
# out.write(combined_frame)
|
147 |
# frame_path = os.path.join(temp_frame_dir, f"frame_{count:05d}.png")
|
148 |
# cv2.imwrite(frame_path, combined_frame)
|
149 |
+
orig_frame = cv2.cvtColor(raw_frame, cv2.COLOR_BGR2RGB)
|
150 |
+
|
151 |
+
cv2.imwrite(f"vframe{count}.jpg", orig_frame)
|
152 |
+
orig_frames.append(f"vframe{count}.jpg")
|
153 |
+
cv2.imwrite(f"dframe{count}.jpg", depth_color)
|
154 |
+
depth_frames.append(f"dframe{count}.jpg")
|
155 |
count += 1
|
156 |
|
157 |
final_vid = create_video(depth_frames, frame_rate, "depth")
|