generalized_box_iou¶
- torchvision.ops.generalized_box_iou(boxes1: Tensor, boxes2: Tensor) Tensor[原始碼]¶
返回兩組框之間的廣義交併比(Jaccard 指數)。
兩組框都應為
(x1, y1, x2, y2)格式,其中0 <= x1 < x2和0 <= y1 < y2。- 引數:
boxes1 (Tensor[..., N, 4]) – 第一個框集
boxes2 (Tensor[..., M, 4]) – 第二個框集
- 返回:
包含 boxes1 和 boxes2 中每個元素之間成對廣義 IoU 值的 NxM 矩陣
- 返回型別:
Tensor[…, N, M]