monoloco/tests/test_utils.py
Lorenzo Bertoni 2aea30cb7d
add matrix IoU evaluation (#2)
* add boxes_3d and fix bug on kk

* delete stereo script

* add get_iou_matrix

* add statistics

* Add pytest

* add iou_matrix

* refactor evaluation kitti

* add box size constraint on moderate

* refactor evaluation

* pylint check
2019-06-24 08:45:39 +02:00

12 lines
277 B
Python

from utils.misc import get_iou_matrix
def test_iou():
boxes_pred = [[1, 100, 1, 200]]
boxes_gt = [[100., 120., 150., 160.],[12, 110, 130., 160.]]
iou_matrix = get_iou_matrix(boxes_pred, boxes_gt)
assert iou_matrix.shape == (len(boxes_pred), len(boxes_gt))