Commit ·
8b6ae1b
1
Parent(s): 7268007
update
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import spaces
|
| 3 |
import os
|
|
|
|
| 4 |
import subprocess
|
| 5 |
import torch
|
| 6 |
|
|
@@ -156,7 +157,8 @@ def render_reconstruction(input_video, img_focal):
|
|
| 156 |
cam_R = view_camera[:3, :3].unsqueeze(0).cuda()
|
| 157 |
cam_T = view_camera[:3, 3].unsqueeze(0).cuda()
|
| 158 |
vis_video_imgs = []
|
| 159 |
-
|
|
|
|
| 160 |
format='FFMPEG', macro_block_size=1)
|
| 161 |
renderer.set_ground(100, 0, 0)
|
| 162 |
for img_i, _ in enumerate(image_names):
|
|
@@ -174,7 +176,7 @@ def render_reconstruction(input_video, img_focal):
|
|
| 174 |
writer.close()
|
| 175 |
print("finish")
|
| 176 |
|
| 177 |
-
return
|
| 178 |
|
| 179 |
|
| 180 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import spaces
|
| 3 |
import os
|
| 4 |
+
import uuid
|
| 5 |
import subprocess
|
| 6 |
import torch
|
| 7 |
|
|
|
|
| 157 |
cam_R = view_camera[:3, :3].unsqueeze(0).cuda()
|
| 158 |
cam_T = view_camera[:3, 3].unsqueeze(0).cuda()
|
| 159 |
vis_video_imgs = []
|
| 160 |
+
out_path = f'{seq_folder}/vis_output_{str(uuid.uuid4())}.mp4'
|
| 161 |
+
writer = imageio.get_writer(out_path, fps=30, mode='I',
|
| 162 |
format='FFMPEG', macro_block_size=1)
|
| 163 |
renderer.set_ground(100, 0, 0)
|
| 164 |
for img_i, _ in enumerate(image_names):
|
|
|
|
| 176 |
writer.close()
|
| 177 |
print("finish")
|
| 178 |
|
| 179 |
+
return out_path
|
| 180 |
|
| 181 |
|
| 182 |
|