We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b031e91 commit 1db8795Copy full SHA for 1db8795
torchvision/ops/boxes.py
@@ -298,12 +298,6 @@ def generalized_box_iou(boxes1: Tensor, boxes2: Tensor) -> Tensor:
298
"""
299
if not torch.jit.is_scripting() and not torch.jit.is_tracing():
300
_log_api_usage_once(generalized_box_iou)
301
- # degenerate boxes gives inf / nan results
302
- # so do an early check
303
- if (boxes1[:, 2:] < boxes1[:, :2]).any():
304
- raise ValueError("Some of the input boxes1 are invalid.")
305
- if not (boxes2[:, 2:] >= boxes2[:, :2]).all():
306
- raise ValueError("Some of the input boxes2 are invalid.")
307
308
inter, union = _box_inter_union(boxes1, boxes2)
309
iou = inter / union
0 commit comments