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
gaoqiong
MIGraphX
Commits
c71201f9
Commit
c71201f9
authored
Jun 22, 2022
by
charlie
Browse files
Formatting
parent
571a3464
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
src/include/migraphx/op/nonmaxsuppression.hpp
src/include/migraphx/op/nonmaxsuppression.hpp
+22
-22
No files found.
src/include/migraphx/op/nonmaxsuppression.hpp
View file @
c71201f9
...
@@ -129,8 +129,7 @@ struct nonmaxsuppression
...
@@ -129,8 +129,7 @@ struct nonmaxsuppression
// filter boxes below score_threshold
// filter boxes below score_threshold
template
<
class
T
>
template
<
class
T
>
void
filter_boxes_by_score
(
void
filter_boxes_by_score
(
T
scores
,
T
scores
,
std
::
size_t
score_offset_ind
,
std
::
size_t
score_offset_ind
,
std
::
size_t
num_boxes
,
std
::
size_t
num_boxes
,
const
float
score_threshold
,
const
float
score_threshold
,
...
@@ -185,7 +184,8 @@ struct nonmaxsuppression
...
@@ -185,7 +184,8 @@ struct nonmaxsuppression
// index to first value of this batch
// index to first value of this batch
std
::
size_t
batch_boxes_ind
=
batch_idx
*
num_boxes
*
4
;
std
::
size_t
batch_boxes_ind
=
batch_idx
*
num_boxes
*
4
;
std
::
priority_queue
<
std
::
pair
<
float
,
int64_t
>>
boxes_heap
;
std
::
priority_queue
<
std
::
pair
<
float
,
int64_t
>>
boxes_heap
;
filter_boxes_by_score
(
scores
,
score_offset_ind
,
num_boxes
,
score_threshold
,
boxes_heap
);
filter_boxes_by_score
(
scores
,
score_offset_ind
,
num_boxes
,
score_threshold
,
boxes_heap
);
selected_boxes_inside_class
.
clear
();
selected_boxes_inside_class
.
clear
();
// Get the next box with top score, filter by iou_threshold
// Get the next box with top score, filter by iou_threshold
while
(
!
boxes_heap
.
empty
()
&&
while
(
!
boxes_heap
.
empty
()
&&
...
...
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