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]