tfm.vision.iou_similarity.intersection

Compute pairwise intersection areas between boxes.

B: batch_size N: number of groundtruth boxes. M: number of anchor boxes.

gt_boxes a float Tensor with [N, 4], or [B, N, 4]
boxes a float Tensor with [M, 4], or [B, M, 4]

a float Tensor with shape [N, M] or [B, N, M] representing pairwise intersections.