cython_bbox is widely used in object detection tasks. To my best knowledge, it was first implemented in Faster-RCNN. Since then, almost all object detection projects use the source code directly.
pip install cython_bbox
from cython_bbox import bbox_overlaps import numpy as np gt = np.random.random((5, 4)) dt = np.random.random((10, 4)) overlaps = bbox_overlaps( np.ascontiguousarray(dt, dtype=np.float), np.ascontiguousarray(gt, dtype=np.float) )
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.