Skip to content

Commit

Permalink
fix input image vis
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-yf committed May 21, 2023
1 parent f9ab5b4 commit 44febe0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions VAE/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def validation(model, loader_val, writer, step, batch_size=8, device='cuda'):

batch = {'x':ori_img[:,0].to(device), 'z':ori_img[:,1].to(device), 'R': R.to(device), 't': T.to(device), 'K': K.to(device),}
input_img = ori_img[:, 0].detach().cpu().numpy()
input_img = ((input_img.clip(-1, 1)+1)*127.5).astype(np.uint8)
gt_img = ori_img[:, 1].detach().cpu().numpy()
gt_img = ((gt_img.clip(-1, 1)+1)*127.5).astype(np.uint8)
pred_img = model.module.eval_img(batch, None).detach().cpu().numpy()
Expand Down

0 comments on commit 44febe0

Please sign in to comment.