Example

Ground-Truth Bounding Box Assignment Example

To illustrate the algorithm for assigning ground-truth bounding boxes to anchor boxes, consider an IoU matrix X\mathbf{X}. First, if the absolute maximum value in the matrix is x23x_{23}, we assign ground-truth bounding box B3B_3 to anchor box A2A_2, and then discard all elements in row 22 and column 33. Next, we search the remaining valid elements; if the largest is x71x_{71}, we assign B1B_1 to A7A_7 and discard row 77 and column 11. We repeat this process: finding x54x_{54} assigns B4B_4 to A5A_5 (discarding row 55, column 44), and finding x92x_{92} assigns B2B_2 to A9A_9 (discarding row 99, column 22). Once all ground-truth boxes are assigned, we traverse the remaining unassigned anchor boxes (e.g., A1,A3,A4,A6,A8A_1, A_3, A_4, A_6, A_8) and assign them to their highest-IoU ground-truth box only if that specific IoU exceeds a predefined threshold.

Image 0

0

1

Updated 2026-05-20

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L