PowerBoxes
Powerboxes is a package containing utility functions for transforming bounding boxes and computing metrics. It is implemented in both Python and Rust. It shows a significant speedup over the equivalent numpy implementations in Python, or other libraries such as shapely or torchvision.
See source code here
Installation
Example Usage
import powerboxes as pb
import numpy as np
# Create a bounding box
box = np.array([[0, 0, 1, 1]])
# Compute the area of the box
area = pb.box_areas(box)
# Compute the intersection of the box with itself
intersection = pb.iou_distance(box, box)
supported dtypes by most functions