djl234 commited on
Commit
e8eee0c
·
1 Parent(s): 697cdd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -96,7 +96,7 @@ def test(gpu_id, net, img_list, group_size, img_size):
96
  # print(img_list[i].shape,pred_mask[i].shape)
97
  #pred_mask=[crf_refine(img_list[i],pred_mask[i]) for i in range(5)]
98
  print(pred_mask[0].shape)
99
- white=(torch.ones(2,pred_mask[0].shape[1],3)*255)
100
  result = [torch.cat([torch.from_numpy(img_resize[i]),white,torch.from_numpy(pred_mask[i]).unsqueeze(2).repeat(1,1,3)],dim=0).numpy() for i in range(5)]
101
  #w, h = 224,224#Image.open(image_list[i][j]).size
102
  #result = result.resize((w, h), Image.BILINEAR)
 
96
  # print(img_list[i].shape,pred_mask[i].shape)
97
  #pred_mask=[crf_refine(img_list[i],pred_mask[i]) for i in range(5)]
98
  print(pred_mask[0].shape)
99
+ white=(torch.ones(2,pred_mask[0].shape[1],3)*255).long()
100
  result = [torch.cat([torch.from_numpy(img_resize[i]),white,torch.from_numpy(pred_mask[i]).unsqueeze(2).repeat(1,1,3)],dim=0).numpy() for i in range(5)]
101
  #w, h = 224,224#Image.open(image_list[i][j]).size
102
  #result = result.resize((w, h), Image.BILINEAR)