Update app.py
Browse files
app.py
CHANGED
@@ -153,7 +153,7 @@ def _default_render_cameras(batch_size: int = 1):
|
|
153 |
render_cameras = _build_camera_standard(extrinsics, render_camera_intrinsics)
|
154 |
return render_cameras.unsqueeze(0).repeat(batch_size, 1, 1)
|
155 |
|
156 |
-
def generate_mesh(image, source_size=512, render_size=384, mesh_size=
|
157 |
image = preprocess_image(image, source_size).to(model_wrapper.device)
|
158 |
source_camera = _default_source_camera(batch_size=1).to(model_wrapper.device)
|
159 |
|
@@ -177,7 +177,7 @@ def generate_mesh(image, source_size=512, render_size=384, mesh_size=512, export
|
|
177 |
if export_video:
|
178 |
render_cameras = _default_render_cameras(batch_size=1).to(model_wrapper.device)
|
179 |
frames = []
|
180 |
-
chunk_size =
|
181 |
for i in range(0, render_cameras.shape[1], chunk_size):
|
182 |
frame_chunk = model_wrapper.model.synthesizer(
|
183 |
planes,
|
|
|
153 |
render_cameras = _build_camera_standard(extrinsics, render_camera_intrinsics)
|
154 |
return render_cameras.unsqueeze(0).repeat(batch_size, 1, 1)
|
155 |
|
156 |
+
def generate_mesh(image, source_size=512, render_size=384, mesh_size=384, export_mesh=False, export_video=True, fps=30):
|
157 |
image = preprocess_image(image, source_size).to(model_wrapper.device)
|
158 |
source_camera = _default_source_camera(batch_size=1).to(model_wrapper.device)
|
159 |
|
|
|
177 |
if export_video:
|
178 |
render_cameras = _default_render_cameras(batch_size=1).to(model_wrapper.device)
|
179 |
frames = []
|
180 |
+
chunk_size = 1
|
181 |
for i in range(0, render_cameras.shape[1], chunk_size):
|
182 |
frame_chunk = model_wrapper.model.synthesizer(
|
183 |
planes,
|