generalized_box_iou¶
- torchvision.ops.generalized_box_iou(boxes1: Tensor, boxes2: Tensor) Tensor[source]¶
返回兩組邊界框之間的廣義交併比 (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]