tidalove commited on
Commit
a757aaf
·
verified ·
1 Parent(s): 7fa23ea

try pad=0?

Browse files
Files changed (1) hide show
  1. tools/demo_api.py +2 -3
tools/demo_api.py CHANGED
@@ -74,9 +74,8 @@ class Predictor(object):
74
  img_info["raw_img"] = img
75
 
76
  ratio = min(self.test_size[0] / img.shape[0], self.test_size[1] / img.shape[1])
77
- pad = torch.tensor([0,0,0,0])
78
- pad_h = ( self.test_size[0] - img.shape[0] * ratio ) / 2
79
- pad_w = ( self.test_size[1] - img.shape[1] * ratio ) / 2
80
  img_info["pad"] = (pad_w, pad_h)
81
  img_info["ratio"] = ratio
82
 
 
74
  img_info["raw_img"] = img
75
 
76
  ratio = min(self.test_size[0] / img.shape[0], self.test_size[1] / img.shape[1])
77
+ pad_h =0 # ( self.test_size[0] - img.shape[0] * ratio ) / 2
78
+ pad_w =0 # ( self.test_size[1] - img.shape[1] * ratio ) / 2
 
79
  img_info["pad"] = (pad_w, pad_h)
80
  img_info["ratio"] = ratio
81