Skip to content

Commit ee76cef

Browse files
committed
Merge pull request opencv#18527 from alalek:dnn_test_openvino
2 parents e24b162 + 6da05f7 commit ee76cef

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

modules/dnn/perf/perf_net.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ PERF_TEST_P_(DNNTestNetwork, ENet)
111111
if ((backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target != DNN_TARGET_CPU) ||
112112
(backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16))
113113
throw SkipTestException("");
114+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2021010000)
115+
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
116+
throw SkipTestException("");
117+
#endif
114118
processNet("dnn/Enet-model-best.net", "", "enet.yml",
115119
Mat(cv::Size(512, 256), CV_32FC3));
116120
}
@@ -202,6 +206,10 @@ PERF_TEST_P_(DNNTestNetwork, YOLOv3)
202206
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL_FP16)
203207
throw SkipTestException("Test is disabled in OpenVINO 2020.4");
204208
#endif
209+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021010000) // nGraph compilation failure
210+
if (target == DNN_TARGET_MYRIAD)
211+
throw SkipTestException("");
212+
#endif
205213

206214
Mat sample = imread(findDataFile("dnn/dog416.png"));
207215
cvtColor(sample, sample, COLOR_BGR2RGB);
@@ -214,7 +222,7 @@ PERF_TEST_P_(DNNTestNetwork, YOLOv4)
214222
{
215223
if (backend == DNN_BACKEND_HALIDE)
216224
throw SkipTestException("");
217-
if (target == DNN_TARGET_MYRIAD)
225+
if (target == DNN_TARGET_MYRIAD) // not enough resources
218226
throw SkipTestException("");
219227
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2020040000) // nGraph compilation failure
220228
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL)
@@ -233,6 +241,10 @@ PERF_TEST_P_(DNNTestNetwork, YOLOv4_tiny)
233241
{
234242
if (backend == DNN_BACKEND_HALIDE)
235243
throw SkipTestException("");
244+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021010000) // nGraph compilation failure
245+
if (target == DNN_TARGET_MYRIAD)
246+
throw SkipTestException("");
247+
#endif
236248
Mat sample = imread(findDataFile("dnn/dog416.png"));
237249
cvtColor(sample, sample, COLOR_BGR2RGB);
238250
Mat inp;
@@ -263,6 +275,10 @@ PERF_TEST_P_(DNNTestNetwork, Inception_v2_Faster_RCNN)
263275
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2019020000)
264276
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
265277
throw SkipTestException("Test is disabled in OpenVINO 2019R2");
278+
#endif
279+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021010000)
280+
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
281+
throw SkipTestException("Test is disabled in OpenVINO 2021.1 / MYRIAD");
266282
#endif
267283
if (backend == DNN_BACKEND_HALIDE ||
268284
(backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target != DNN_TARGET_CPU) ||

modules/dnn/test/test_darknet_importer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ TEST_P(Test_Darknet_nets, YOLOv4_tiny)
625625
target == DNN_TARGET_CPU ? CV_TEST_TAG_MEMORY_512MB : CV_TEST_TAG_MEMORY_1GB
626626
);
627627

628+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021010000) // nGraph compilation failure
629+
if (target == DNN_TARGET_MYRIAD)
630+
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
631+
#endif
632+
628633
const double confThreshold = 0.5;
629634
// batchId, classId, confidence, left, top, right, bottom
630635
const int N0 = 2;

modules/dnn/test/test_torch_importer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ TEST_P(Test_Torch_nets, ENet_accuracy)
359359
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
360360
throw SkipTestException("");
361361
}
362+
#endif
363+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2021010000)
364+
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
365+
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
362366
#endif
363367
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target != DNN_TARGET_CPU)
364368
{

0 commit comments

Comments
 (0)