Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
1db87957
"git@developer.sourcefind.cn:change/sglang.git" did not exist on "e0b2d3eebebd3d4efc7e323ad2dee605b607f394"
Unverified
Commit
1db87957
authored
Mar 28, 2022
by
Vasilis Vryniotis
Committed by
GitHub
Mar 28, 2022
Browse files
Remove assertions for generalized_box_iou (#5691)
parent
b031e917
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
torchvision/ops/boxes.py
torchvision/ops/boxes.py
+0
-6
No files found.
torchvision/ops/boxes.py
View file @
1db87957
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment