Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
847190b5
Commit
847190b5
authored
Mar 19, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16828 from paroj:nmspy
parents
0f312318
66cf55ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
dnn.hpp
modules/dnn/include/opencv2/dnn/dnn.hpp
+1
-1
test_dnn.py
modules/dnn/misc/python/test/test_dnn.py
+6
-0
No files found.
modules/dnn/include/opencv2/dnn/dnn.hpp
View file @
847190b5
...
...
@@ -1038,7 +1038,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
* @param eta a coefficient in adaptive threshold formula: \f$nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\f$.
* @param top_k if `>0`, keep at most @p top_k picked indices.
*/
CV_EXPORTS
_W
void
NMSBoxes
(
const
std
::
vector
<
Rect
>&
bboxes
,
const
std
::
vector
<
float
>&
scores
,
CV_EXPORTS
void
NMSBoxes
(
const
std
::
vector
<
Rect
>&
bboxes
,
const
std
::
vector
<
float
>&
scores
,
const
float
score_threshold
,
const
float
nms_threshold
,
CV_OUT
std
::
vector
<
int
>&
indices
,
const
float
eta
=
1.
f
,
const
int
top_k
=
0
);
...
...
modules/dnn/misc/python/test/test_dnn.py
View file @
847190b5
...
...
@@ -230,6 +230,12 @@ class dnn_test(NewOpenCVTests):
self
.
assertTrue
(
ret
)
normAssert
(
self
,
refs
[
i
],
result
,
'Index:
%
d'
%
i
,
1e-10
)
def
test_nms
(
self
):
confs
=
(
1
,
1
)
rects
=
((
0
,
0
,
0.4
,
0.4
),
(
0
,
0
,
0.2
,
0.4
))
# 0.5 overlap
self
.
assertTrue
(
all
(
cv
.
dnn
.
NMSBoxes
(
rects
,
confs
,
0
,
0.6
)
.
ravel
()
==
(
0
,
1
)))
def
test_custom_layer
(
self
):
class
CropLayer
(
object
):
def
__init__
(
self
,
params
,
blobs
):
...
...
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