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
MMCV
Commits
d31b2212
Unverified
Commit
d31b2212
authored
Mar 17, 2023
by
NoCakeAnyMore
Committed by
GitHub
Mar 17, 2023
Browse files
[Fix] nms_rotated_npu accepts angle parameter (#2674)
parent
03ea1c9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
mmcv/ops/nms.py
mmcv/ops/nms.py
+3
-0
No files found.
mmcv/ops/nms.py
View file @
d31b2212
...
...
@@ -412,6 +412,9 @@ def nms_rotated(dets: Tensor,
input_labels
=
labels
if
dets
.
device
.
type
==
'npu'
:
order
=
scores
.
new_empty
(
0
,
dtype
=
torch
.
long
)
coefficient
=
57.29578
# 180 / PI
for
i
in
range
(
dets
.
size
()[
0
]):
dets_cw
[
i
][
4
]
*=
coefficient
# radians to angle
keep_inds
=
ext_module
.
nms_rotated
(
dets_cw
,
scores
,
order
,
dets_cw
,
input_labels
,
iou_threshold
,
multi_label
)
...
...
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