Spaces:
Runtime error
Runtime error
Commit
•
ad3be6b
1
Parent(s):
e5201da
Speedup (#2)
Browse files- Speedup (c2c1fd32d3855fd284015fec9c212d4ad9684eb0)
Co-authored-by: Shubham Goel <shubham-goel@users.noreply.huggingface.co>
app.py
CHANGED
@@ -94,13 +94,6 @@ def infer(in_pil_img, in_threshold=0.8, out_pil_img=None):
|
|
94 |
input_patch = batch['img'][n].cpu() * (DEFAULT_STD[:,None,None]/255) + (DEFAULT_MEAN[:,None,None]/255)
|
95 |
input_patch = input_patch.permute(1,2,0).numpy()
|
96 |
|
97 |
-
regression_img = renderer(out['pred_vertices'][n].detach().cpu().numpy(),
|
98 |
-
out['pred_cam_t'][n].detach().cpu().numpy(),
|
99 |
-
batch['img'][n],
|
100 |
-
mesh_base_color=LIGHT_BLUE,
|
101 |
-
scene_bg_color=(1, 1, 1),
|
102 |
-
)
|
103 |
-
|
104 |
|
105 |
verts = out['pred_vertices'][n].detach().cpu().numpy()
|
106 |
cam_t = pred_cam_t[n]
|
|
|
94 |
input_patch = batch['img'][n].cpu() * (DEFAULT_STD[:,None,None]/255) + (DEFAULT_MEAN[:,None,None]/255)
|
95 |
input_patch = input_patch.permute(1,2,0).numpy()
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
verts = out['pred_vertices'][n].detach().cpu().numpy()
|
99 |
cam_t = pred_cam_t[n]
|