5cd677e5ade7710a85d172d1f745b6d1fa4a1e4d,tests/transforms_tests/bbox_tests/test_resize_bbox.py,TestResizeBbox,test_resize_bbox,#TestResizeBbox#,11
Before Change
class TestResizeBbox(unittest.TestCase):
def test_resize_bbox(self):
bbox = np.random.uniform(
low=0., high=32., size=(10, 4))
out = resize_bbox(bbox, in_size=(32, 32), out_size=(64, 128))
bbox_expected = bbox.copy()
bbox_expected[:, 0] = bbox[:, 0] * 2
bbox_expected[:, 1] = bbox[:, 1] * 4
bbox_expected[:, 2] = bbox[:, 2] * 2
bbox_expected[:, 3] = bbox[:, 3] * 4
np.testing.assert_equal(out, bbox_expected)
After Change
class TestResizeBbox(unittest.TestCase):
def test_resize_bbox(self):
bbox = generate_random_bbox(10, (32, 32), 0, 32)
out = resize_bbox(bbox, in_size=(32, 32), out_size=(64, 128))
bbox_expected = bbox.copy()
bbox_expected[:, 0] = bbox[:, 0] * 2
bbox_expected[:, 1] = bbox[:, 1] * 4
bbox_expected[:, 2] = bbox[:, 2] * 2
bbox_expected[:, 3] = bbox[:, 3] * 4
np.testing.assert_equal(out, bbox_expected)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: chainer/chainercv
Commit Name: 5cd677e5ade7710a85d172d1f745b6d1fa4a1e4d
Time: 2018-09-08
Author: shingogo@hotmail.co.jp
File Name: tests/transforms_tests/bbox_tests/test_resize_bbox.py
Class Name: TestResizeBbox
Method Name: test_resize_bbox
Project Name: chainer/chainercv
Commit Name: 5cd677e5ade7710a85d172d1f745b6d1fa4a1e4d
Time: 2018-09-08
Author: shingogo@hotmail.co.jp
File Name: tests/transforms_tests/bbox_tests/test_flip_bbox.py
Class Name: TestFlipBbox
Method Name: test_flip_bbox
Project Name: chainer/chainercv
Commit Name: 5cd677e5ade7710a85d172d1f745b6d1fa4a1e4d
Time: 2018-09-08
Author: shingogo@hotmail.co.jp
File Name: tests/transforms_tests/bbox_tests/test_translate_bbox.py
Class Name: TestTranslateBbox
Method Name: test_translate_bbox