Calculating IoU on bboxes coordinates

Hi, I’m looking for a way to calculate intersection over union given the predicted and ground truth bbox.

I found that you can do it using ops.boxes.box_iou from torchvision (Box intersection-over-union returns zero), but it seems I can’t find the docs referencing to that function.

There’s also recommendation on IOU pytorch implementation, but they’re using classes when my current case is class-agnostic.

1 Like

I found the same problem as well. Actually, you can use ops.box_iou(output, target) to calculate the IoU directly. Source code page.