1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2020-04-24 18:32:18 +00:00
30 changed files with 1658 additions and 44 deletions
+90 -7
View File
@@ -128,13 +128,32 @@ TEST_P(Test_TensorFlow_layers, reduce_mean)
runTensorFlowNet("global_pool_by_axis");
}
TEST_P(Test_TensorFlow_layers, conv)
TEST_P(Test_TensorFlow_layers, conv_single_conv)
{
runTensorFlowNet("single_conv");
}
TEST_P(Test_TensorFlow_layers, conv_atrous_conv2d_valid)
{
runTensorFlowNet("atrous_conv2d_valid");
}
TEST_P(Test_TensorFlow_layers, conv_atrous_conv2d_same)
{
runTensorFlowNet("atrous_conv2d_same");
}
TEST_P(Test_TensorFlow_layers, conv_depthwise_conv2d)
{
runTensorFlowNet("depthwise_conv2d");
}
TEST_P(Test_TensorFlow_layers, conv_keras_atrous_conv2d_same)
{
runTensorFlowNet("keras_atrous_conv2d_same");
}
TEST_P(Test_TensorFlow_layers, conv_pool_nchw)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
runTensorFlowNet("conv_pool_nchw");
}
@@ -291,11 +310,32 @@ TEST_P(Test_TensorFlow_layers, slim_batch_norm)
runTensorFlowNet("slim_batch_norm", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, pooling)
TEST_P(Test_TensorFlow_layers, pooling_max_pool_even)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
runTensorFlowNet("max_pool_even");
}
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_valid)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
runTensorFlowNet("max_pool_odd_valid");
}
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_same)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
runTensorFlowNet("max_pool_odd_same");
}
TEST_P(Test_TensorFlow_layers, pooling_reduce_mean)
{
runTensorFlowNet("reduce_mean"); // an average pooling over all spatial dimensions.
}
@@ -815,24 +855,67 @@ TEST_P(Test_TensorFlow_nets, EAST_text_detection)
INSTANTIATE_TEST_CASE_P(/**/, Test_TensorFlow_nets, dnnBackendsAndTargets());
TEST_P(Test_TensorFlow_layers, fp16_weights)
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_single_conv)
{
float l1 = 0.00078;
float lInf = 0.012;
float l1 = 0.00078, lInf = 0.012;
runTensorFlowNet("fp16_single_conv", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_same)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
float l1 = 0.00078, lInf = 0.012;
runTensorFlowNet("fp16_max_pool_odd_same", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_eltwise_add_mul)
{
float l1 = 0.00078, lInf = 0.012;
runTensorFlowNet("fp16_eltwise_add_mul", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_pad_and_concat)
{
float l1 = 0.00078, lInf = 0.012;
runTensorFlowNet("fp16_pad_and_concat", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_padding_valid)
{
float l1 = 0.00078, lInf = 0.012;
runTensorFlowNet("fp16_padding_valid", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_even)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
float l1 = 0.00078, lInf = 0.012;
// Reference output values are in range [0.0889, 1.651]
runTensorFlowNet("fp16_max_pool_even", false, (target == DNN_TARGET_MYRIAD) ? 0.003 : l1, lInf);
if (target == DNN_TARGET_MYRIAD)
{
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_deconvolution)
{
float l1 = 0.00078, lInf = 0.012;
if (target == DNN_TARGET_MYRIAD) {
l1 = 0.0041;
lInf = 0.024;
}
// Reference output values are in range [0, 10.75]
runTensorFlowNet("fp16_deconvolution", false, l1, lInf);
}
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_valid)
{
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GE(2020020000)
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
#endif
float l1 = 0.00078, lInf = 0.012;
if (target == DNN_TARGET_MYRIAD) {
l1 = 0.0041;
lInf = 0.024;
}
// Reference output values are in range [0.418, 2.297]
runTensorFlowNet("fp16_max_pool_odd_valid", false, l1, lInf);
}