Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
a5f9f0c
1
Parent(s):
b62271e
update
Browse files
asset3d_gen/data/backproject_v2.py
CHANGED
@@ -423,6 +423,7 @@ class TextureBacker:
|
|
423 |
colors: list[Image.Image],
|
424 |
mesh: trimesh.Trimesh,
|
425 |
) -> trimesh.Trimesh:
|
|
|
426 |
self.vertices = torch.from_numpy(mesh.vertices).to(self.device).float()
|
427 |
self.faces = torch.from_numpy(mesh.faces).to(self.device).to(torch.int)
|
428 |
self.uv_map = torch.from_numpy(mesh.visual.uv).to(self.device).float()
|
@@ -464,7 +465,6 @@ class TextureBacker:
|
|
464 |
mesh: trimesh.Trimesh,
|
465 |
output_path: str,
|
466 |
) -> trimesh.Trimesh:
|
467 |
-
self._lazy_init_render(self.camera_params, self.mask_thresh)
|
468 |
mesh = self.load_mesh(mesh)
|
469 |
|
470 |
texture_np, mask_np = self.cuda_forward(colors, mesh)
|
|
|
423 |
colors: list[Image.Image],
|
424 |
mesh: trimesh.Trimesh,
|
425 |
) -> trimesh.Trimesh:
|
426 |
+
self._lazy_init_render(self.camera_params, self.mask_thresh)
|
427 |
self.vertices = torch.from_numpy(mesh.vertices).to(self.device).float()
|
428 |
self.faces = torch.from_numpy(mesh.faces).to(self.device).to(torch.int)
|
429 |
self.uv_map = torch.from_numpy(mesh.visual.uv).to(self.device).float()
|
|
|
465 |
mesh: trimesh.Trimesh,
|
466 |
output_path: str,
|
467 |
) -> trimesh.Trimesh:
|
|
|
468 |
mesh = self.load_mesh(mesh)
|
469 |
|
470 |
texture_np, mask_np = self.cuda_forward(colors, mesh)
|