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
dedd9660
Commit
dedd9660
authored
Apr 16, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14345 from dkurt:fix_dnn_ie_mac
parents
6d3ae8d4
c667de9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
20 deletions
+28
-20
normalize_bbox_layer.cpp
modules/dnn/src/layers/normalize_bbox_layer.cpp
+8
-12
op_inf_engine.hpp
modules/dnn/src/op_inf_engine.hpp
+20
-8
No files found.
modules/dnn/src/layers/normalize_bbox_layer.cpp
View file @
dedd9660
...
@@ -275,13 +275,13 @@ public:
...
@@ -275,13 +275,13 @@ public:
InferenceEngine
::
Blob
::
Ptr
weights
;
InferenceEngine
::
Blob
::
Ptr
weights
;
if
(
blobs
.
empty
())
if
(
blobs
.
empty
())
{
{
auto
onesBlob
=
InferenceEngine
::
make_shared_blob
<
float
>
(
InferenceEngine
::
Precision
::
FP32
,
weights
=
InferenceEngine
::
make_shared_blob
<
float
>
(
InferenceEngine
::
Precision
::
FP32
,
InferenceEngine
::
Layout
::
C
,
InferenceEngine
::
Layout
::
C
,
{(
size_t
)
numChannels
});
{(
size_t
)
numChannels
});
onesBlob
->
allocate
();
weights
->
allocate
();
std
::
vector
<
float
>
ones
(
numChannels
,
1
);
onesBlob
->
set
(
one
s
);
Mat
weightsMat
=
infEngineBlobToMat
(
weights
).
reshape
(
1
,
numChannel
s
);
weights
=
onesBlob
;
Mat
(
numChannels
,
1
,
CV_32F
,
Scalar
(
1
)).
copyTo
(
weightsMat
)
;
l
.
getParameters
()[
"channel_shared"
]
=
false
;
l
.
getParameters
()[
"channel_shared"
]
=
false
;
}
}
else
else
...
@@ -290,11 +290,7 @@ public:
...
@@ -290,11 +290,7 @@ public:
weights
=
wrapToInfEngineBlob
(
blobs
[
0
],
{(
size_t
)
numChannels
},
InferenceEngine
::
Layout
::
C
);
weights
=
wrapToInfEngineBlob
(
blobs
[
0
],
{(
size_t
)
numChannels
},
InferenceEngine
::
Layout
::
C
);
l
.
getParameters
()[
"channel_shared"
]
=
blobs
[
0
].
total
()
==
1
;
l
.
getParameters
()[
"channel_shared"
]
=
blobs
[
0
].
total
()
==
1
;
}
}
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1)
addConstantData
(
"weights"
,
weights
,
l
);
l
.
getParameters
()[
"weights"
]
=
weights
;
#else
l
.
addConstantData
(
"weights"
,
weights
);
#endif
l
.
getParameters
()[
"across_spatial"
]
=
acrossSpatial
;
l
.
getParameters
()[
"across_spatial"
]
=
acrossSpatial
;
return
Ptr
<
BackendNode
>
(
new
InfEngineBackendNode
(
l
));
return
Ptr
<
BackendNode
>
(
new
InfEngineBackendNode
(
l
));
}
}
...
...
modules/dnn/src/op_inf_engine.hpp
View file @
dedd9660
...
@@ -15,14 +15,6 @@
...
@@ -15,14 +15,6 @@
#include "opencv2/dnn/utils/inference_engine.hpp"
#include "opencv2/dnn/utils/inference_engine.hpp"
#ifdef HAVE_INF_ENGINE
#ifdef HAVE_INF_ENGINE
#if defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#include <inference_engine.hpp>
#if defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic pop
#endif
#define INF_ENGINE_RELEASE_2018R3 2018030000
#define INF_ENGINE_RELEASE_2018R3 2018030000
#define INF_ENGINE_RELEASE_2018R4 2018040000
#define INF_ENGINE_RELEASE_2018R4 2018040000
...
@@ -37,12 +29,32 @@
...
@@ -37,12 +29,32 @@
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_GE(ver) (((INF_ENGINE_RELEASE) / 10000) >= ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_GE(ver) (((INF_ENGINE_RELEASE) / 10000) >= ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_LT(ver) (((INF_ENGINE_RELEASE) / 10000) < ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_LT(ver) (((INF_ENGINE_RELEASE) / 10000) < ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_LE(ver) (((INF_ENGINE_RELEASE) / 10000) <= ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_EQ(ver) (((INF_ENGINE_RELEASE) / 10000) == ((ver) / 10000))
#define INF_ENGINE_VER_MAJOR_EQ(ver) (((INF_ENGINE_RELEASE) / 10000) == ((ver) / 10000))
#if defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#if defined(__GNUC__) && INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1)
#pragma GCC visibility push(default)
#endif
#include <inference_engine.hpp>
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2018R5)
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2018R5)
#include <ie_builders.hpp>
#include <ie_builders.hpp>
#endif
#endif
#if defined(__GNUC__) && INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1)
#pragma GCC visibility pop
#endif
#if defined(__GNUC__) && __GNUC__ >= 5
//#pragma GCC diagnostic pop
#endif
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE
namespace
cv
{
namespace
dnn
{
namespace
cv
{
namespace
dnn
{
...
...
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