Skip to content

Commit

Permalink
fix pad_val not used in class Pad when pad to a fixed size (#2093)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhcalibur authored Feb 13, 2020
1 parent da6eb35 commit 389bfeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmdet/datasets/pipelines/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def __init__(self, size=None, size_divisor=None, pad_val=0):

def _pad_img(self, results):
if self.size is not None:
padded_img = mmcv.impad(results['img'], self.size)
padded_img = mmcv.impad(results['img'], self.size, self.pad_val)
elif self.size_divisor is not None:
padded_img = mmcv.impad_to_multiple(
results['img'], self.size_divisor, pad_val=self.pad_val)
Expand Down

0 comments on commit 389bfeb

Please sign in to comment.