Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions torchvision/ops/boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,6 @@ def generalized_box_iou(boxes1: Tensor, boxes2: Tensor) -> Tensor:
"""
if not torch.jit.is_scripting() and not torch.jit.is_tracing():
_log_api_usage_once(generalized_box_iou)
# degenerate boxes gives inf / nan results
# so do an early check
if (boxes1[:, 2:] < boxes1[:, :2]).any():
raise ValueError("Some of the input boxes1 are invalid.")
if not (boxes2[:, 2:] >= boxes2[:, :2]).all():
raise ValueError("Some of the input boxes2 are invalid.")

inter, union = _box_inter_union(boxes1, boxes2)
iou = inter / union
Expand Down