trackforge / utils / geometry
Module geometry
Quick Reference
| Item | Kind | Description |
|---|---|---|
iou |
fn | Calculate Intersection over Union (IoU) between two bounding boxes. |
iou_batch |
fn | Calculate IoU matrix between two lists of bounding boxes. |
tlwh_to_tlbr |
fn | Convert a bounding box from TLWH (Top-Left-Width-Height) to TLBR (Top-Left-Bottom-Right) format. |
Functions
iou
Calculate Intersection over Union (IoU) between two bounding boxes.
Arguments
| Argument | Description |
|---|---|
box1 |
First bounding box in TLWH format. |
box2 |
Second bounding box in TLWH format. |
iou_batch
Calculate IoU matrix between two lists of bounding boxes.
Returns a 2D vector where result[i][j] is the IoU between bboxes1[i] and bboxes2[j].
tlwh_to_tlbr
Convert a bounding box from TLWH (Top-Left-Width-Height) to TLBR (Top-Left-Bottom-Right) format.