Commit 864942be authored by huanghaian's avatar huanghaian Committed by zhouzaida
Browse files

fix resize error

parent 29135c22
...@@ -187,7 +187,6 @@ class Resize(BaseTransform): ...@@ -187,7 +187,6 @@ class Resize(BaseTransform):
backend=self.backend) backend=self.backend)
results['img'] = img results['img'] = img
results['img_shape'] = img.shape[:2] results['img_shape'] = img.shape[:2]
results['scale'] = img.shape[:2][::-1]
results['scale_factor'] = (w_scale, h_scale) results['scale_factor'] = (w_scale, h_scale)
results['keep_ratio'] = self.keep_ratio results['keep_ratio'] = self.keep_ratio
......
...@@ -92,7 +92,6 @@ class TestResize: ...@@ -92,7 +92,6 @@ class TestResize:
transform = Resize(scale=(2000, 2000), keep_ratio=True) transform = Resize(scale=(2000, 2000), keep_ratio=True)
results = transform(copy.deepcopy(data_info)) results = transform(copy.deepcopy(data_info))
assert results['img'].shape[:2] == (2000, 1200) assert results['img'].shape[:2] == (2000, 1200)
assert results['scale'] == (1200, 2000)
assert results['scale_factor'] == (1200 / 800, 2000 / 1333) assert results['scale_factor'] == (1200 / 800, 2000 / 1333)
# test resize_bboxes/seg/kps # test resize_bboxes/seg/kps
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment