Spaces:
Runtime error
Runtime error
scripts/multiview_inference.py
CHANGED
@@ -14,7 +14,6 @@ from pytorch3d.structures import Meshes, join_meshes_as_scene
|
|
14 |
import numpy as np
|
15 |
|
16 |
def fast_geo(front_normal: Image.Image, back_normal: Image.Image, side_normal: Image.Image, clamp=0., init_type="std"):
|
17 |
-
import time
|
18 |
if front_normal.mode == "RGB":
|
19 |
front_normal = simple_remove(front_normal, run_sr=False)
|
20 |
front_normal = front_normal.resize((192, 192))
|
@@ -59,7 +58,7 @@ def erode_alpha(img_list):
|
|
59 |
img = Image.fromarray(np.concatenate([arr[:, :, :3], alpha[:, :, None]], axis=-1))
|
60 |
out_img_list.append(img)
|
61 |
return out_img_list
|
62 |
-
|
63 |
def geo_reconstruct(rgb_pils, normal_pils, front_pil, do_refine=False, predict_normal=True, expansion_weight=0.1, init_type="std"):
|
64 |
if front_pil.size[0] <= 512:
|
65 |
front_pil = run_sr_fast([front_pil])[0]
|
|
|
14 |
import numpy as np
|
15 |
|
16 |
def fast_geo(front_normal: Image.Image, back_normal: Image.Image, side_normal: Image.Image, clamp=0., init_type="std"):
|
|
|
17 |
if front_normal.mode == "RGB":
|
18 |
front_normal = simple_remove(front_normal, run_sr=False)
|
19 |
front_normal = front_normal.resize((192, 192))
|
|
|
58 |
img = Image.fromarray(np.concatenate([arr[:, :, :3], alpha[:, :, None]], axis=-1))
|
59 |
out_img_list.append(img)
|
60 |
return out_img_list
|
61 |
+
|
62 |
def geo_reconstruct(rgb_pils, normal_pils, front_pil, do_refine=False, predict_normal=True, expansion_weight=0.1, init_type="std"):
|
63 |
if front_pil.size[0] <= 512:
|
64 |
front_pil = run_sr_fast([front_pil])[0]
|