5cd677e5ade7710a85d172d1f745b6d1fa4a1e4d,tests/transforms_tests/bbox_tests/test_flip_bbox.py,TestFlipBbox,test_flip_bbox,#TestFlipBbox#,11
Before Change
class TestFlipBbox(unittest.TestCase):
def test_flip_bbox(self):
bbox = np.random.uniform(
low=0., high=32., size=(10, 4))
out = flip_bbox(bbox, size=(34, 32), y_flip=True)
bbox_expected = bbox.copy()
bbox_expected[:, 0] = 34 - bbox[:, 2]
bbox_expected[:, 2] = 34 - bbox[:, 0]
np.testing.assert_equal(out, bbox_expected)
out = flip_bbox(bbox, size=(34, 32), x_flip=True)
After Change
class TestFlipBbox(unittest.TestCase):
def test_flip_bbox(self):
bbox = generate_random_bbox(10, (32, 32), 0, 32)
out = flip_bbox(bbox, size=(34, 32), y_flip=True)
bbox_expected = bbox.copy()
bbox_expected[:, 0] = 34 - bbox[:, 2]
bbox_expected[:, 2] = 34 - bbox[:, 0]
np.testing.assert_equal(out, bbox_expected)
out = flip_bbox(bbox, size=(34, 32), x_flip=True)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
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_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
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