Nadine Rueegg commited on
Commit
7d88acd
·
1 Parent(s): 3cd5df9
Files changed (1) hide show
  1. scripts/gradio_demo.py +0 -4
scripts/gradio_demo.py CHANGED
@@ -523,12 +523,8 @@ def run_bite_inference(input_image, bbox=None, apply_ttopt=True):
523
  pred_tex = visualizations[0, :, :, :].permute((1, 2, 0)).cpu().detach().numpy() / 256
524
  # out_path = root_out_path_details + name + '_tex_pred_e' + format(i, '03d') + '.png'
525
  # plt.imsave(out_path, pred_tex)
526
- input_image_np = img_inp.copy()
527
- im_masked = cv2.addWeighted(input_image_np,0.2,pred_tex,0.8,0)
528
  pred_tex_max = np.max(pred_tex, axis=2)
529
- im_masked[pred_tex_max<0.01, :] = input_image_np[pred_tex_max<0.01, :]
530
  out_path = root_out_path + name + '_comp_pred_e' + format(i, '03d') + '.png'
531
- # plt.imsave(out_path, im_masked)
532
  # save mesh
533
  my_mesh_tri = trimesh.Trimesh(vertices=smal_verts[0, ...].detach().cpu().numpy(), faces=faces_prep[0, ...].detach().cpu().numpy(), process=False, maintain_order=True)
534
  my_mesh_tri.visual.vertex_colors = vert_colors
 
523
  pred_tex = visualizations[0, :, :, :].permute((1, 2, 0)).cpu().detach().numpy() / 256
524
  # out_path = root_out_path_details + name + '_tex_pred_e' + format(i, '03d') + '.png'
525
  # plt.imsave(out_path, pred_tex)
 
 
526
  pred_tex_max = np.max(pred_tex, axis=2)
 
527
  out_path = root_out_path + name + '_comp_pred_e' + format(i, '03d') + '.png'
 
528
  # save mesh
529
  my_mesh_tri = trimesh.Trimesh(vertices=smal_verts[0, ...].detach().cpu().numpy(), faces=faces_prep[0, ...].detach().cpu().numpy(), process=False, maintain_order=True)
530
  my_mesh_tri.visual.vertex_colors = vert_colors