<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/ops/iou_similarity.py#L38-L72) |

Compute pairwise intersection areas between boxes.

    tfm.vision.iou_similarity.intersection(
        gt_boxes, boxes
    )

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

<br />

<br />

<br />

| ## Args ||
|---|---|
| `gt_boxes` | a float Tensor with \[N, 4\], or \[B, N, 4\] |
| `boxes` | a float Tensor with \[M, 4\], or \[B, M, 4\] |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| a float Tensor with shape \[N, M\] or \[B, N, M\] representing pairwise intersections. ||

<br />