Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
ef84893
1
Parent(s):
af4af03
update
Browse files
asset3d_gen/data/backproject_v2.py
CHANGED
@@ -425,8 +425,7 @@ class TextureBacker:
|
|
425 |
mesh: trimesh.Trimesh,
|
426 |
) -> trimesh.Trimesh:
|
427 |
self._lazy_init_render(self.camera_params, self.mask_thresh)
|
428 |
-
|
429 |
-
print("self.device cuda_forward", self.device)
|
430 |
vertices = torch.from_numpy(mesh.vertices).to(self.device).float()
|
431 |
faces = torch.from_numpy(mesh.faces).to(self.device).to(torch.int)
|
432 |
uv_map = torch.from_numpy(mesh.visual.uv).to(self.device).float()
|
@@ -464,8 +463,7 @@ class TextureBacker:
|
|
464 |
mesh: trimesh.Trimesh,
|
465 |
output_path: str,
|
466 |
) -> trimesh.Trimesh:
|
467 |
-
|
468 |
-
|
469 |
texture_np, mask_np = self.cuda_forward(colors, mesh)
|
470 |
|
471 |
texture_np = self.uv_inpaint(mesh, texture_np, mask_np)
|
|
|
425 |
mesh: trimesh.Trimesh,
|
426 |
) -> trimesh.Trimesh:
|
427 |
self._lazy_init_render(self.camera_params, self.mask_thresh)
|
428 |
+
|
|
|
429 |
vertices = torch.from_numpy(mesh.vertices).to(self.device).float()
|
430 |
faces = torch.from_numpy(mesh.faces).to(self.device).to(torch.int)
|
431 |
uv_map = torch.from_numpy(mesh.visual.uv).to(self.device).float()
|
|
|
463 |
mesh: trimesh.Trimesh,
|
464 |
output_path: str,
|
465 |
) -> trimesh.Trimesh:
|
466 |
+
mesh = self.load_mesh(mesh)
|
|
|
467 |
texture_np, mask_np = self.cuda_forward(colors, mesh)
|
468 |
|
469 |
texture_np = self.uv_inpaint(mesh, texture_np, mask_np)
|