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
ModelZoo
SOLOv2-pytorch
Commits
ae4646fa
Unverified
Commit
ae4646fa
authored
Nov 30, 2018
by
Kai Chen
Committed by
GitHub
Nov 30, 2018
Browse files
Merge pull request #131 from youansheng/patch-4
Update gpu_nms.pyx
parents
64e310d5
d1d35451
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmdet/ops/nms/gpu_nms.pyx
mmdet/ops/nms/gpu_nms.pyx
+2
-2
No files found.
mmdet/ops/nms/gpu_nms.pyx
View file @
ae4646fa
...
@@ -19,7 +19,7 @@ memory_pool = {}
...
@@ -19,7 +19,7 @@ memory_pool = {}
def
gpu_nms
(
np
.
ndarray
[
np
.
float32_t
,
ndim
=
2
]
dets
,
np
.
float
thresh
,
def
gpu_nms
(
np
.
ndarray
[
np
.
float32_t
,
ndim
=
2
]
dets
,
np
.
float
thresh
,
np
.
int32_t
device_id
=
0
):
np
.
int32_t
device_id
=
0
):
cdef
int
boxes_num
=
dets
.
shape
[
0
]
cdef
int
boxes_num
=
dets
.
shape
[
0
]
cdef
int
boxes_dim
=
dets
.
shape
[
1
]
cdef
int
boxes_dim
=
5
cdef
int
num_out
cdef
int
num_out
cdef
size_t
base
cdef
size_t
base
cdef
np
.
ndarray
[
np
.
int32_t
,
ndim
=
1
]
\
cdef
np
.
ndarray
[
np
.
int32_t
,
ndim
=
1
]
\
...
@@ -29,7 +29,7 @@ def gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh,
...
@@ -29,7 +29,7 @@ def gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh,
cdef
np
.
ndarray
[
np
.
int_t
,
ndim
=
1
]
\
cdef
np
.
ndarray
[
np
.
int_t
,
ndim
=
1
]
\
order
=
scores
.
argsort
()[::
-
1
]
order
=
scores
.
argsort
()[::
-
1
]
cdef
np
.
ndarray
[
np
.
float32_t
,
ndim
=
2
]
\
cdef
np
.
ndarray
[
np
.
float32_t
,
ndim
=
2
]
\
sorted_dets
=
dets
[
order
,
:]
sorted_dets
=
dets
[
order
,
:
5
]
cdef
float
cthresh
=
thresh
cdef
float
cthresh
=
thresh
if
device_id
not
in
memory_pool
:
if
device_id
not
in
memory_pool
:
with
nogil
:
with
nogil
:
...
...
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