Spaces:
Runtime error
Runtime error
update
Browse files- infer_api.py +3 -4
infer_api.py
CHANGED
|
@@ -560,10 +560,7 @@ def infer_refine(meshes, imgs):
|
|
| 560 |
flow_vert, flow_vector = None, None
|
| 561 |
last_colors, last_normals = None, None
|
| 562 |
last_front_color, last_front_normal = None, None
|
| 563 |
-
distract_mask = None
|
| 564 |
-
|
| 565 |
-
mv, proj = make_star_cameras_orthographic(8, 1, r=1.2)
|
| 566 |
-
mv = mv[[4, 3, 2, 0, 6, 5]]
|
| 567 |
|
| 568 |
results = []
|
| 569 |
|
|
@@ -577,6 +574,8 @@ def infer_refine(meshes, imgs):
|
|
| 577 |
if last_colors is None:
|
| 578 |
@spaces.GPU()
|
| 579 |
def get_mask():
|
|
|
|
|
|
|
| 580 |
renderer = NormalsRenderer(mv,proj,(1024,1024))
|
| 581 |
images = renderer.render(
|
| 582 |
torch.tensor(mesh_v, device='cuda').float(),
|
|
|
|
| 560 |
flow_vert, flow_vector = None, None
|
| 561 |
last_colors, last_normals = None, None
|
| 562 |
last_front_color, last_front_normal = None, None
|
| 563 |
+
distract_mask = None
|
|
|
|
|
|
|
|
|
|
| 564 |
|
| 565 |
results = []
|
| 566 |
|
|
|
|
| 574 |
if last_colors is None:
|
| 575 |
@spaces.GPU()
|
| 576 |
def get_mask():
|
| 577 |
+
mv, proj = make_star_cameras_orthographic(8, 1, r=1.2)
|
| 578 |
+
mv = mv[[4, 3, 2, 0, 6, 5]]
|
| 579 |
renderer = NormalsRenderer(mv,proj,(1024,1024))
|
| 580 |
images = renderer.render(
|
| 581 |
torch.tensor(mesh_v, device='cuda').float(),
|