bug fix
Browse files
mesh_reconstruction/recon.py
CHANGED
@@ -12,7 +12,7 @@ from scripts.utils import to_py3d_mesh, init_target
|
|
12 |
def reconstruct_stage1(pils: List[Image.Image], steps=100, vertices=None, faces=None, start_edge_len=0.15, end_edge_len=0.005, decay=0.995, return_mesh=True, loss_expansion_weight=0.1, gain=0.1):
|
13 |
vertices, faces = vertices.to("cuda"), faces.to("cuda")
|
14 |
assert len(pils) == 4
|
15 |
-
|
16 |
renderer = Pytorch3DNormalsRenderer(cameras, list(pils[0].size), device="cuda")
|
17 |
|
18 |
target_images = init_target(pils, new_bkgd=(0., 0., 0.)) # 4s
|
|
|
12 |
def reconstruct_stage1(pils: List[Image.Image], steps=100, vertices=None, faces=None, start_edge_len=0.15, end_edge_len=0.005, decay=0.995, return_mesh=True, loss_expansion_weight=0.1, gain=0.1):
|
13 |
vertices, faces = vertices.to("cuda"), faces.to("cuda")
|
14 |
assert len(pils) == 4
|
15 |
+
cameras = make_star_cameras_orthographic_py3d([0, 270, 180, 90], device="cuda", focal=1., dist=4.0)
|
16 |
renderer = Pytorch3DNormalsRenderer(cameras, list(pils[0].size), device="cuda")
|
17 |
|
18 |
target_images = init_target(pils, new_bkgd=(0., 0., 0.)) # 4s
|
mesh_reconstruction/refine.py
CHANGED
@@ -17,7 +17,7 @@ def run_mesh_refine(vertices, faces, pils: List[Image.Image], steps=100, start_e
|
|
17 |
poission_steps = []
|
18 |
|
19 |
assert len(pils) == 4
|
20 |
-
|
21 |
renderer = Pytorch3DNormalsRenderer(cameras, list(pils[0].size), device="cuda")
|
22 |
|
23 |
target_images = init_target(pils, new_bkgd=(0., 0., 0.)) # 4s
|
|
|
17 |
poission_steps = []
|
18 |
|
19 |
assert len(pils) == 4
|
20 |
+
cameras = make_star_cameras_orthographic_py3d([0, 270, 180, 90], device="cuda", focal=1., dist=4.0)
|
21 |
renderer = Pytorch3DNormalsRenderer(cameras, list(pils[0].size), device="cuda")
|
22 |
|
23 |
target_images = init_target(pils, new_bkgd=(0., 0., 0.)) # 4s
|