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
814ebe39
Commit
814ebe39
authored
Jul 31, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12113 from dkurt:dnn_fix_ssd_on_myriad
parents
61c870ae
ed0e79cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
detection_output_layer.cpp
modules/dnn/src/layers/detection_output_layer.cpp
+1
-0
test_backends.cpp
modules/dnn/test/test_backends.cpp
+3
-6
No files found.
modules/dnn/src/layers/detection_output_layer.cpp
View file @
814ebe39
...
...
@@ -919,6 +919,7 @@ public:
ieLayer
->
params
[
"nms_threshold"
]
=
format
(
"%f"
,
_nmsThreshold
);
ieLayer
->
params
[
"top_k"
]
=
format
(
"%d"
,
_topK
);
ieLayer
->
params
[
"keep_top_k"
]
=
format
(
"%d"
,
_keepTopK
);
ieLayer
->
params
[
"eta"
]
=
"1.0"
;
ieLayer
->
params
[
"confidence_threshold"
]
=
format
(
"%f"
,
_confidenceThreshold
);
ieLayer
->
params
[
"variance_encoded_in_target"
]
=
_varianceEncodedInTarget
?
"1"
:
"0"
;
ieLayer
->
params
[
"code_type"
]
=
"caffe.PriorBoxParameter."
+
_codeType
;
...
...
modules/dnn/test/test_backends.cpp
View file @
814ebe39
...
...
@@ -175,7 +175,7 @@ TEST_P(DNNTestNetwork, MobileNet_SSD_v2_TensorFlow)
Mat
sample
=
imread
(
findDataFile
(
"dnn/street.png"
,
false
));
Mat
inp
=
blobFromImage
(
sample
,
1.0
f
/
127.5
,
Size
(
300
,
300
),
Scalar
(
127.5
,
127.5
,
127.5
),
false
);
float
l1
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.011
:
0.0
;
float
lInf
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.06
:
0.0
;
float
lInf
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.06
2
:
0.0
;
processNet
(
"dnn/ssd_mobilenet_v2_coco_2018_03_29.pb"
,
"dnn/ssd_mobilenet_v2_coco_2018_03_29.pbtxt"
,
inp
,
"detection_out"
,
""
,
l1
,
lInf
,
0.25
);
}
...
...
@@ -233,11 +233,8 @@ TEST_P(DNNTestNetwork, opencv_face_detector)
{
if
(
backend
==
DNN_BACKEND_HALIDE
)
throw
SkipTestException
(
""
);
Size
inpSize
;
if
(
backend
==
DNN_BACKEND_INFERENCE_ENGINE
&&
target
==
DNN_TARGET_MYRIAD
)
inpSize
=
Size
(
300
,
300
);
Mat
img
=
imread
(
findDataFile
(
"gpu/lbpcascade/er.png"
,
false
));
Mat
inp
=
blobFromImage
(
img
,
1.0
,
inpSize
,
Scalar
(
104.0
,
177.0
,
123.0
),
false
,
false
);
Mat
inp
=
blobFromImage
(
img
,
1.0
,
Size
()
,
Scalar
(
104.0
,
177.0
,
123.0
),
false
,
false
);
processNet
(
"dnn/opencv_face_detector.caffemodel"
,
"dnn/opencv_face_detector.prototxt"
,
inp
,
"detection_out"
);
}
...
...
@@ -249,7 +246,7 @@ TEST_P(DNNTestNetwork, Inception_v2_SSD_TensorFlow)
Mat
sample
=
imread
(
findDataFile
(
"dnn/street.png"
,
false
));
Mat
inp
=
blobFromImage
(
sample
,
1.0
f
/
127.5
,
Size
(
300
,
300
),
Scalar
(
127.5
,
127.5
,
127.5
),
false
);
float
l1
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.008
:
0.0
;
float
lInf
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.07
:
0.0
;
float
lInf
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.07
31
:
0.0
;
processNet
(
"dnn/ssd_inception_v2_coco_2017_11_17.pb"
,
"dnn/ssd_inception_v2_coco_2017_11_17.pbtxt"
,
inp
,
"detection_out"
,
""
,
l1
,
lInf
);
}
...
...
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