utils.box

utils.box#

General methods for working with boxes

For more details see https://d2l.ai/chapter_computer-vision/anchor.html.

Functions

box_center_to_corner

Convert from (center, width, height) to (upper-left, lower-right)

box_corner_to_center

Convert from (upper-left, lower-right) to (center, width, height)

box_iou

Compute pairwise IoU across two lists of anchor or bounding boxes

multibox_detection

Predict bounding boxes using non-maximum suppression

nms

Sort confidence scores of predicted bounding boxes

offset_boxes

Transform for anchor box offsets

offset_inverse

Predict bounding boxes based on anchor boxes with predicted offsets