Skip to content

Commit 992c908

Browse files
authored
Merge pull request opencv#17756 from ilyachur:feature/ichuraev/fix_ngraph_headers
* Fixed header paths for some nGraph ops * Added dependency on IE version
1 parent 657c8d1 commit 992c908

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

modules/dnn/src/layers/detection_output_layer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,14 @@
5454

5555
#ifdef HAVE_DNN_NGRAPH
5656
#include "../ie_ngraph.hpp"
57+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
58+
#include <ngraph/op/detection_output.hpp>
59+
#else
5760
#include <ngraph/op/experimental/layers/detection_output.hpp>
5861
#endif
5962

63+
#endif
64+
6065
namespace cv
6166
{
6267
namespace dnn

modules/dnn/src/layers/pooling_layer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,14 @@
4949

5050
#ifdef HAVE_DNN_NGRAPH
5151
#include "../ie_ngraph.hpp"
52+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
53+
#include <ngraph/op/roi_pooling.hpp>
54+
#include <ngraph/op/psroi_pooling.hpp>
55+
#else
5256
#include <ngraph/op/experimental/layers/roi_pooling.hpp>
5357
#include <ngraph/op/experimental/layers/psroi_pooling.hpp>
5458
#endif
59+
#endif
5560

5661
#include "../op_vkcom.hpp"
5762

modules/dnn/src/layers/prior_box_layer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@
4747

4848
#ifdef HAVE_DNN_NGRAPH
4949
#include "../ie_ngraph.hpp"
50+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
51+
#include <ngraph/op/prior_box.hpp>
52+
#include <ngraph/op/prior_box_clustered.hpp>
53+
#else
5054
#include <ngraph/op/experimental/layers/prior_box.hpp>
5155
#include <ngraph/op/experimental/layers/prior_box_clustered.hpp>
5256
#endif
57+
#endif
5358

5459
#include "../op_vkcom.hpp"
5560

modules/dnn/src/layers/proposal_layer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010

1111
#ifdef HAVE_DNN_NGRAPH
1212
#include "../ie_ngraph.hpp"
13+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
14+
#include <ngraph/op/proposal.hpp>
15+
#else
1316
#include <ngraph/op/experimental/layers/proposal.hpp>
1417
#endif
18+
#endif
1519

1620
namespace cv { namespace dnn {
1721

modules/dnn/src/layers/reorg_layer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@
4646

4747
#ifdef HAVE_DNN_NGRAPH
4848
#include "../ie_ngraph.hpp"
49+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
50+
#include <ngraph/op/reorg_yolo.hpp>
51+
#else
4952
#include <ngraph/op/experimental/layers/reorg_yolo.hpp>
5053
#endif
54+
#endif
5155

5256
#include <opencv2/dnn/shape_utils.hpp>
5357
#include <opencv2/dnn/all_layers.hpp>

modules/dnn/src/layers/resize_layer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212

1313
#ifdef HAVE_DNN_NGRAPH
1414
#include "../ie_ngraph.hpp"
15+
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
16+
#include <ngraph/op/interpolate.hpp>
17+
#else
1518
#include <ngraph/op/experimental/layers/interpolate.hpp>
1619
#endif
20+
#endif
1721

1822
#ifdef HAVE_CUDA
1923
#include "../cuda4dnn/primitives/resize.hpp"

0 commit comments

Comments
 (0)