Esempio n. 1
0
    def test_anchor_sizes_for_aspect_ratio(self):
        raw_ret = [[0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333],
                   [0.666666666666667, 0.333333333333333]]

        ret = Bboxer.anchor_sizes(grid_size=3, aspect_ratio=(2., 1.))

        self.assert_arr_equals(ret, raw_ret)
Esempio n. 2
0
    def test_anchor_sizes(self):
        raw_ret = [[0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333],
                   [0.333333333333333, 0.333333333333333]]

        ret = Bboxer.anchor_sizes(grid_size=3)

        self.assert_arr_equals(ret, raw_ret)