Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
food-round2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joel Joseph
food-round2
Commits
d1d35451
Unverified
Commit
d1d35451
authored
6 years ago
by
YouAnsheng
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update gpu_nms.pyx
Fix bug for gpu_nms.
parent
64e310d5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mmdet/ops/nms/gpu_nms.pyx
+2
-2
2 additions, 2 deletions
mmdet/ops/nms/gpu_nms.pyx
with
2 additions
and
2 deletions
mmdet/ops/nms/gpu_nms.pyx
+
2
−
2
View file @
d1d35451
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment