Changed condition for resize and lrn layers

pull/13774/head
Liubov Batanina 6 years ago
parent 6b4becfd03
commit 183c0fcab1
  1. 3
      modules/dnn/perf/perf_net.cpp
  2. 2
      modules/dnn/src/layers/lrn_layer.cpp
  3. 4
      modules/dnn/src/layers/normalize_bbox_layer.cpp
  4. 5
      modules/dnn/src/layers/resize_layer.cpp
  5. 2
      modules/dnn/test/test_backends.cpp
  6. 2
      modules/dnn/test/test_tf_importer.cpp
  7. 4
      modules/dnn/test/test_torch_importer.cpp

@ -124,8 +124,7 @@ PERF_TEST_P_(DNNTestNetwork, SSD)
PERF_TEST_P_(DNNTestNetwork, OpenFace)
{
if (backend == DNN_BACKEND_HALIDE ||
(backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16) ||
(backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD))
(backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD))
throw SkipTestException("");
processNet("dnn/openface_nn4.small2.v1.t7", "", "",
Mat(cv::Size(96, 96), CV_32FC3));

@ -92,7 +92,7 @@ public:
{
return backendId == DNN_BACKEND_OPENCV ||
backendId == DNN_BACKEND_HALIDE ||
(backendId == DNN_BACKEND_INFERENCE_ENGINE && (preferableTarget != DNN_TARGET_MYRIAD || type == CHANNEL_NRM));
backendId == DNN_BACKEND_INFERENCE_ENGINE;
}
#ifdef HAVE_OPENCL

@ -65,9 +65,9 @@ public:
{
if (backendId == DNN_BACKEND_INFERENCE_ENGINE)
{
if (pnorm != 2) {
if (pnorm != 2)
return false;
}
return preferableTarget == DNN_TARGET_MYRIAD ? !acrossSpatial : startAxis == 1;
}
return backendId == DNN_BACKEND_OPENCV;

@ -54,12 +54,11 @@ public:
#ifdef HAVE_INF_ENGINE
if (backendId == DNN_BACKEND_INFERENCE_ENGINE)
{
return (interpolation == "nearest" && preferableTarget != DNN_TARGET_MYRIAD) ||
return (interpolation == "nearest" && scaleWidth == scaleHeight) ||
(interpolation == "bilinear" && INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2018R4));
}
else
#endif
return backendId == DNN_BACKEND_OPENCV;
return backendId == DNN_BACKEND_OPENCV;
}
virtual void finalize(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr) CV_OVERRIDE

@ -226,7 +226,7 @@ TEST_P(DNNTestNetwork, OpenPose_pose_mpi_faster_4_stages)
TEST_P(DNNTestNetwork, OpenFace)
{
#if defined(INF_ENGINE_RELEASE)
#if (INF_ENGINE_RELEASE < 2018030000)
#if (INF_ENGINE_RELEASE < 2018030000 || INF_ENGINE_RELEASE == 2018050000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD)
throw SkipTestException("");
#elif INF_ENGINE_RELEASE < 2018040000

@ -558,8 +558,6 @@ TEST_P(Test_TensorFlow_layers, split)
TEST_P(Test_TensorFlow_layers, resize_nearest_neighbor)
{
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target != DNN_TARGET_MYRIAD)
throw SkipTestException("");
runTensorFlowNet("resize_nearest_neighbor");
runTensorFlowNet("keras_upsampling2d");
}

@ -272,13 +272,11 @@ class Test_Torch_nets : public DNNTestLayer {};
TEST_P(Test_Torch_nets, OpenFace_accuracy)
{
#if defined(INF_ENGINE_RELEASE) && (INF_ENGINE_RELEASE < 2018030000)
#if defined(INF_ENGINE_RELEASE) && (INF_ENGINE_RELEASE < 2018030000 || INF_ENGINE_RELEASE == 2018050000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD)
throw SkipTestException("");
#endif
checkBackend();
if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16 && INF_ENGINE_RELEASE != 2018050000)
throw SkipTestException("");
const string model = findDataFile("dnn/openface_nn4.small2.v1.t7", false);
Net net = readNetFromTorch(model);

Loading…
Cancel
Save