Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liyinshuo committed May 18, 2021
1 parent a62bdba commit 7a9ac78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions mmedit/datasets/pipelines/augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Resize:
backend (str | None): The image resize backend type. Options are `cv2`,
`pillow`, `None`. If backend is None, the global imread_backend
specified by ``mmcv.use_backend()`` will be used.
Default: "pillow".
Default: "cv2".
output_keys (list[str] | None): The resized images. Default: None
Note that if it is not `None`, its length shuld be equal to keys.
"""
Expand All @@ -65,7 +65,7 @@ def __init__(self,
size_factor=None,
max_size=None,
interpolation='bilinear',
backend=None,
backend='cv2',
output_keys=None):
assert keys, 'Keys should not be empty.'
if output_keys:
Expand Down
8 changes: 1 addition & 7 deletions tests/test_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def test_resize(self):

name_ = str(resize_keep_ratio)
assert name_ == resize_keep_ratio.__class__.__name__ + (
f"(keys={['gt_img']}, output_keys={['gt_img']}, "
"(keys=['gt_img'], output_keys=['gt_img'], "
'scale=(128, 128), '
f'keep_ratio={False}, size_factor=None, '
'max_size=None,interpolation=bilinear)')
Expand Down Expand Up @@ -686,9 +686,3 @@ def mirror_sequence(self):
with pytest.raises(TypeError):
results = dict(lq=0, gt=gts)
mirror_sequence(results)


if __name__ == '__main__':
aug = TestAugmentations()
aug.setup_class()
aug.test_resize()

0 comments on commit 7a9ac78

Please sign in to comment.