mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
commit
b16f76eede
@ -868,6 +868,7 @@ macro(ocv_check_modules define)
|
|||||||
list(APPEND _libs_paths ${CMAKE_MATCH_1})
|
list(APPEND _libs_paths ${CMAKE_MATCH_1})
|
||||||
elseif(IS_ABSOLUTE "${flag}"
|
elseif(IS_ABSOLUTE "${flag}"
|
||||||
OR flag STREQUAL "-lstdc++"
|
OR flag STREQUAL "-lstdc++"
|
||||||
|
OR flag STREQUAL "-latomic"
|
||||||
)
|
)
|
||||||
list(APPEND _libs "${flag}")
|
list(APPEND _libs "${flag}")
|
||||||
elseif(flag MATCHES "^-l(.*)")
|
elseif(flag MATCHES "^-l(.*)")
|
||||||
|
@ -15,7 +15,7 @@ We will see each one of them.
|
|||||||
|
|
||||||
### 1. Sobel and Scharr Derivatives
|
### 1. Sobel and Scharr Derivatives
|
||||||
|
|
||||||
Sobel operators is a joint Gausssian smoothing plus differentiation operation, so it is more
|
Sobel operators is a joint Gaussian smoothing plus differentiation operation, so it is more
|
||||||
resistant to noise. You can specify the direction of derivatives to be taken, vertical or horizontal
|
resistant to noise. You can specify the direction of derivatives to be taken, vertical or horizontal
|
||||||
(by the arguments, yorder and xorder respectively). You can also specify the size of kernel by the
|
(by the arguments, yorder and xorder respectively). You can also specify the size of kernel by the
|
||||||
argument ksize. If ksize = -1, a 3x3 Scharr filter is used which gives better results than 3x3 Sobel
|
argument ksize. If ksize = -1, a 3x3 Scharr filter is used which gives better results than 3x3 Sobel
|
||||||
@ -97,4 +97,4 @@ Try it
|
|||||||
<iframe src="../../js_gradients_absSobel.html" width="100%"
|
<iframe src="../../js_gradients_absSobel.html" width="100%"
|
||||||
onload="this.style.height=this.contentDocument.body.scrollHeight +'px';">
|
onload="this.style.height=this.contentDocument.body.scrollHeight +'px';">
|
||||||
</iframe>
|
</iframe>
|
||||||
\endhtmlonly
|
\endhtmlonly
|
||||||
|
@ -14,7 +14,7 @@ So in this chapter, you will learn:
|
|||||||
Apart from OpenCV, Python also provides a module **time** which is helpful in measuring the time of
|
Apart from OpenCV, Python also provides a module **time** which is helpful in measuring the time of
|
||||||
execution. Another module **profile** helps to get a detailed report on the code, like how much time
|
execution. Another module **profile** helps to get a detailed report on the code, like how much time
|
||||||
each function in the code took, how many times the function was called, etc. But, if you are using
|
each function in the code took, how many times the function was called, etc. But, if you are using
|
||||||
IPython, all these features are integrated in an user-friendly manner. We will see some important
|
IPython, all these features are integrated in a user-friendly manner. We will see some important
|
||||||
ones, and for more details, check links in the **Additional Resources** section.
|
ones, and for more details, check links in the **Additional Resources** section.
|
||||||
|
|
||||||
Measuring Performance with OpenCV
|
Measuring Performance with OpenCV
|
||||||
|
@ -17,7 +17,7 @@ We will see each one of them.
|
|||||||
|
|
||||||
### 1. Sobel and Scharr Derivatives
|
### 1. Sobel and Scharr Derivatives
|
||||||
|
|
||||||
Sobel operators is a joint Gausssian smoothing plus differentiation operation, so it is more
|
Sobel operators is a joint Gaussian smoothing plus differentiation operation, so it is more
|
||||||
resistant to noise. You can specify the direction of derivatives to be taken, vertical or horizontal
|
resistant to noise. You can specify the direction of derivatives to be taken, vertical or horizontal
|
||||||
(by the arguments, yorder and xorder respectively). You can also specify the size of kernel by the
|
(by the arguments, yorder and xorder respectively). You can also specify the size of kernel by the
|
||||||
argument ksize. If ksize = -1, a 3x3 Scharr filter is used which gives better results than 3x3 Sobel
|
argument ksize. If ksize = -1, a 3x3 Scharr filter is used which gives better results than 3x3 Sobel
|
||||||
|
@ -976,6 +976,12 @@ bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* minLoc
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (dev.deviceVersionMajor() == 1 && dev.deviceVersionMinor() < 2)
|
||||||
|
{
|
||||||
|
// 'static' storage class specifier used by "minmaxloc" is available from OpenCL 1.2+ only
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool doubleSupport = dev.doubleFPConfig() > 0, haveMask = !_mask.empty(),
|
bool doubleSupport = dev.doubleFPConfig() > 0, haveMask = !_mask.empty(),
|
||||||
haveSrc2 = _src2.kind() != _InputArray::NONE;
|
haveSrc2 = _src2.kind() != _InputArray::NONE;
|
||||||
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type),
|
int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type),
|
||||||
|
@ -204,14 +204,13 @@ public:
|
|||||||
std::vector<InferenceEngine::DataConfig> outDataConfig;
|
std::vector<InferenceEngine::DataConfig> outDataConfig;
|
||||||
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_2)
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_2)
|
||||||
InferenceEngine::SizeVector order;
|
InferenceEngine::SizeVector order;
|
||||||
size_t offset = std::numeric_limits<size_t>::max();
|
|
||||||
for (int i = 0; i < node->get_input_size(); ++i)
|
for (int i = 0; i < node->get_input_size(); ++i)
|
||||||
{
|
{
|
||||||
InferenceEngine::DataConfig conf;
|
InferenceEngine::DataConfig conf;
|
||||||
auto shape = node->input_value(i).get_shape();
|
auto shape = node->input_value(i).get_shape();
|
||||||
order.resize(shape.size());
|
order.resize(shape.size());
|
||||||
std::iota(order.begin(), order.end(), 0);
|
std::iota(order.begin(), order.end(), 0);
|
||||||
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order, offset});
|
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order});
|
||||||
inDataConfig.push_back(conf);
|
inDataConfig.push_back(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +220,7 @@ public:
|
|||||||
auto shape = node->output(i).get_shape();
|
auto shape = node->output(i).get_shape();
|
||||||
order.resize(shape.size());
|
order.resize(shape.size());
|
||||||
std::iota(order.begin(), order.end(), 0);
|
std::iota(order.begin(), order.end(), 0);
|
||||||
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order, offset});
|
conf.desc = InferenceEngine::TensorDesc(InferenceEngine::Precision::FP32, shape, {shape, order});
|
||||||
outDataConfig.push_back(conf);
|
outDataConfig.push_back(conf);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -201,12 +201,6 @@ TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe_Different_Width_Height)
|
|||||||
if (backend == DNN_BACKEND_HALIDE)
|
if (backend == DNN_BACKEND_HALIDE)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_HALIDE);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_HALIDE);
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
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);
|
|
||||||
// May hang on some configurations
|
// May hang on some configurations
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
|
@ -726,10 +726,6 @@ TEST_P(Test_Caffe_nets, FasterRCNN_vgg16)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
|
|
||||||
// Check 'backward_compatible_check || in_out_elements_equal' failed at core/src/op/reshape.cpp:427:
|
// Check 'backward_compatible_check || in_out_elements_equal' failed at core/src/op/reshape.cpp:427:
|
||||||
// While validating node 'v1::Reshape bbox_pred_reshape (bbox_pred[0]:f32{1,84}, Constant_265242[0]:i64{4}) -> (f32{?,?,?,?})' with friendly_name 'bbox_pred_reshape':
|
// While validating node 'v1::Reshape bbox_pred_reshape (bbox_pred[0]:f32{1,84}, Constant_265242[0]:i64{4}) -> (f32{?,?,?,?})' with friendly_name 'bbox_pred_reshape':
|
||||||
// Requested output shape {1,6300,4,1} is incompatible with input shape {1, 84}
|
// Requested output shape {1,6300,4,1} is incompatible with input shape {1, 84}
|
||||||
@ -761,12 +757,6 @@ TEST_P(Test_Caffe_nets, FasterRCNN_zf)
|
|||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 ||
|
if ((backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 ||
|
||||||
backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && target == DNN_TARGET_OPENCL_FP16)
|
backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && target == DNN_TARGET_OPENCL_FP16)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16);
|
||||||
@ -802,15 +792,6 @@ TEST_P(Test_Caffe_nets, RFCN)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Sporadic: "Cannot get memory!"
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL_FP16)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL_FP16)
|
||||||
{
|
{
|
||||||
scoreDiff = 0.1f;
|
scoreDiff = 0.1f;
|
||||||
|
@ -975,20 +975,10 @@ TEST_P(Test_Darknet_layers, shortcut_leaky)
|
|||||||
}
|
}
|
||||||
TEST_P(Test_Darknet_layers, shortcut_unequal)
|
TEST_P(Test_Darknet_layers, shortcut_unequal)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
testDarknetLayer("shortcut_unequal");
|
testDarknetLayer("shortcut_unequal");
|
||||||
}
|
}
|
||||||
TEST_P(Test_Darknet_layers, shortcut_unequal_2)
|
TEST_P(Test_Darknet_layers, shortcut_unequal_2)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
testDarknetLayer("shortcut_unequal_2");
|
testDarknetLayer("shortcut_unequal_2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,12 +643,6 @@ TEST_P(NoParamActivation, Accuracy)
|
|||||||
Target targetId = get<1>(get<1>(GetParam()));
|
Target targetId = get<1>(get<1>(GetParam()));
|
||||||
std::string layer_type = get<0>(GetParam());
|
std::string layer_type = get<0>(GetParam());
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && targetId == DNN_TARGET_CPU && layer_type == "BNLL")
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LayerParams lp;
|
LayerParams lp;
|
||||||
lp.type = layer_type;
|
lp.type = layer_type;
|
||||||
lp.name = "testLayer";
|
lp.name = "testLayer";
|
||||||
|
@ -1486,12 +1486,6 @@ static void test_dldt_fused_output(Backend backend, Target target)
|
|||||||
|
|
||||||
TEST_P(Test_DLDT_layers, fused_output)
|
TEST_P(Test_DLDT_layers, fused_output)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CV_DNN_REGISTER_LAYER_CLASS(Unsupported, UnsupportedLayer);
|
CV_DNN_REGISTER_LAYER_CLASS(Unsupported, UnsupportedLayer);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1651,16 +1645,7 @@ TEST_P(Test_Caffe_layers, Interp)
|
|||||||
TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only)
|
TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021030000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021030000)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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); // exception
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); // exception
|
||||||
#endif
|
#endif
|
||||||
|
@ -407,19 +407,11 @@ TEST_P(Test_Model, DetectRegionWithNmsAcrossClasses)
|
|||||||
TEST_P(Test_Model, DetectionOutput)
|
TEST_P(Test_Model, DetectionOutput)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Check 'backward_compatible_check || in_out_elements_equal' failed at core/src/op/reshape.cpp:427:
|
// Check 'backward_compatible_check || in_out_elements_equal' failed at core/src/op/reshape.cpp:427:
|
||||||
// While validating node 'v1::Reshape bbox_pred_reshape (ave_bbox_pred_rois[0]:f32{1,8,1,1}, Constant_388[0]:i64{4}) -> (f32{?,?,?,?})' with friendly_name 'bbox_pred_reshape':
|
// While validating node 'v1::Reshape bbox_pred_reshape (ave_bbox_pred_rois[0]:f32{1,8,1,1}, Constant_388[0]:i64{4}) -> (f32{?,?,?,?})' with friendly_name 'bbox_pred_reshape':
|
||||||
// Requested output shape {1,300,8,1} is incompatible with input shape {1, 8, 1, 1}
|
// Requested output shape {1,300,8,1} is incompatible with input shape {1, 8, 1, 1}
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Exception: Function contains several inputs and outputs with one friendly name! (HETERO bug?)
|
// Exception: Function contains several inputs and outputs with one friendly name! (HETERO bug?)
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target != DNN_TARGET_CPU)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target != DNN_TARGET_CPU)
|
||||||
@ -634,9 +626,6 @@ TEST_P(Test_Model, Segmentation)
|
|||||||
float norm = 0;
|
float norm = 0;
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Failed to allocate graph: NC_ERROR
|
// Failed to allocate graph: NC_ERROR
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
|
@ -106,12 +106,6 @@ TEST_P(Test_ONNX_layers, MaxPooling)
|
|||||||
}
|
}
|
||||||
TEST_P(Test_ONNX_layers, MaxPooling_2)
|
TEST_P(Test_ONNX_layers, MaxPooling_2)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
testONNXModels("two_maxpooling", npy, 0, 0, false, false);
|
testONNXModels("two_maxpooling", npy, 0, 0, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,19 +590,7 @@ TEST_P(Test_ONNX_layers, Elementwise_Sqrt)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Elementwise_not)
|
TEST_P(Test_ONNX_layers, Elementwise_not)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
// Cannot get memory!
|
|
||||||
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);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
|
||||||
@ -619,11 +601,7 @@ TEST_P(Test_ONNX_layers, Elementwise_not)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Compare_EQ)
|
TEST_P(Test_ONNX_layers, Compare_EQ)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -644,11 +622,7 @@ TEST_P(Test_ONNX_layers, Compare_EQ)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Compare_GT)
|
TEST_P(Test_ONNX_layers, Compare_GT)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -669,11 +643,7 @@ TEST_P(Test_ONNX_layers, Compare_GT)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Compare_LT)
|
TEST_P(Test_ONNX_layers, Compare_LT)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -704,11 +674,7 @@ TEST_P(Test_ONNX_layers, Compare_LEorEQ)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, CompareSameDims_EQ)
|
TEST_P(Test_ONNX_layers, CompareSameDims_EQ)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -729,11 +695,7 @@ TEST_P(Test_ONNX_layers, CompareSameDims_EQ)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, CompareSameDims_GT)
|
TEST_P(Test_ONNX_layers, CompareSameDims_GT)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -754,11 +716,7 @@ TEST_P(Test_ONNX_layers, CompareSameDims_GT)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, CompareSameDims_LT)
|
TEST_P(Test_ONNX_layers, CompareSameDims_LT)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// IE exception: Function contains several inputs and outputs with one friendly name!
|
// IE exception: Function contains several inputs and outputs with one friendly name!
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -1182,17 +1140,6 @@ TEST_P(Test_ONNX_layers, Slice_Steps_2DInput)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Slice_Steps_3DInput)
|
TEST_P(Test_ONNX_layers, Slice_Steps_3DInput)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
testONNXModels("slice_opset_11_steps_3d");
|
testONNXModels("slice_opset_11_steps_3d");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1203,20 +1150,6 @@ TEST_P(Test_ONNX_layers, Slice_Steps_4DInput)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, Slice_Steps_5DInput)
|
TEST_P(Test_ONNX_layers, Slice_Steps_5DInput)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
// Cannot get memory!
|
|
||||||
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
|
|
||||||
|
|
||||||
testONNXModels("slice_opset_11_steps_5d");
|
testONNXModels("slice_opset_11_steps_5d");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1253,9 +1186,6 @@ TEST_P(Test_ONNX_layers, Split_EltwiseMax)
|
|||||||
TEST_P(Test_ONNX_layers, LSTM_Activations)
|
TEST_P(Test_ONNX_layers, LSTM_Activations)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Node Block1326/lstm/reshape_0/permute was not assigned on any pointed device
|
// IE exception: Node Block1326/lstm/reshape_0/permute was not assigned on any pointed device
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -1292,9 +1222,6 @@ TEST_P(Test_ONNX_layers, LSTM_hidden)
|
|||||||
TEST_P(Test_ONNX_layers, LSTM_hidden_bidirectional)
|
TEST_P(Test_ONNX_layers, LSTM_hidden_bidirectional)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Node Transpose_45 was not assigned on any pointed device.
|
// IE exception: Node Transpose_45 was not assigned on any pointed device.
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -1308,9 +1235,6 @@ TEST_P(Test_ONNX_layers, LSTM_hidden_bidirectional)
|
|||||||
TEST_P(Test_ONNX_layers, GRU)
|
TEST_P(Test_ONNX_layers, GRU)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// IE exception: Node GRU_22 was not assigned on any pointed device
|
// IE exception: Node GRU_22 was not assigned on any pointed device
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
||||||
@ -1342,11 +1266,7 @@ TEST_P(Test_ONNX_layers, LSTM_cell_forward)
|
|||||||
}
|
}
|
||||||
TEST_P(Test_ONNX_layers, LSTM_cell_bidirectional)
|
TEST_P(Test_ONNX_layers, LSTM_cell_bidirectional)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2021040000)
|
|
||||||
// Ngraph operation Reshape with name LSTM_16/lstm_y/reshape has dynamic output shape on 0 port, but CPU plug-in supports only static shape
|
// Ngraph operation Reshape with name LSTM_16/lstm_y/reshape has dynamic output shape on 0 port, but CPU plug-in supports only static shape
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_OPENCL)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1719,16 +1639,7 @@ TEST_P(Test_ONNX_layers, MaxPoolSigmoid1d)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, MaxPool1d_Twise)
|
TEST_P(Test_ONNX_layers, MaxPool1d_Twise)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||||
{
|
{
|
||||||
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
@ -1743,11 +1654,7 @@ TEST_P(Test_ONNX_layers, MaxPool1d_Twise)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, AvePool1d)
|
TEST_P(Test_ONNX_layers, AvePool1d)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
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);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||||
{
|
{
|
||||||
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
@ -1762,19 +1669,7 @@ TEST_P(Test_ONNX_layers, AvePool1d)
|
|||||||
|
|
||||||
TEST_P(Test_ONNX_layers, PoolConv1d)
|
TEST_P(Test_ONNX_layers, PoolConv1d)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
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);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LT(2021040000)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||||
{
|
{
|
||||||
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
|
@ -216,9 +216,6 @@ TEST_P(Test_TensorFlow_layers, conv_keras_atrous_conv2d_same)
|
|||||||
TEST_P(Test_TensorFlow_layers, conv_pool_nchw)
|
TEST_P(Test_TensorFlow_layers, conv_pool_nchw)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -496,9 +493,6 @@ TEST_P(Test_TensorFlow_layers, slim_batch_norm)
|
|||||||
TEST_P(Test_TensorFlow_layers, pooling_max_pool_even)
|
TEST_P(Test_TensorFlow_layers, pooling_max_pool_even)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -511,9 +505,6 @@ TEST_P(Test_TensorFlow_layers, pooling_max_pool_even)
|
|||||||
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_valid)
|
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_valid)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -526,9 +517,6 @@ TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_valid)
|
|||||||
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_same)
|
TEST_P(Test_TensorFlow_layers, pooling_max_pool_odd_same)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -849,14 +837,6 @@ TEST_P(Test_TensorFlow_layers, ExpandDims)
|
|||||||
TEST_P(Test_TensorFlow_layers, l2_normalize_3d)
|
TEST_P(Test_TensorFlow_layers, l2_normalize_3d)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
// accuracy
|
// accuracy
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1118,9 +1098,6 @@ TEST_P(Test_TensorFlow_nets, Faster_RCNN_resnet50_coco_2018_01_28)
|
|||||||
);
|
);
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: subgraphTopoSortsStep < subgraphs.size()
|
// [ GENERAL_ERROR ] AssertionFailed: subgraphTopoSortsStep < subgraphs.size()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1360,9 +1337,6 @@ TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_single_conv)
|
|||||||
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_same)
|
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_same)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1391,9 +1365,6 @@ TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_padding_valid)
|
|||||||
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_even)
|
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_even)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1418,9 +1389,6 @@ TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_deconvolution)
|
|||||||
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_valid)
|
TEST_P(Test_TensorFlow_layers, fp16_weights_fp16_max_pool_odd_valid)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
// [ GENERAL_ERROR ] AssertionFailed: !expired()
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_MYRIAD)
|
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);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
||||||
@ -1507,16 +1475,6 @@ TEST_P(Test_TensorFlow_layers, split_equals)
|
|||||||
|
|
||||||
TEST_P(Test_TensorFlow_layers, resize_nearest_neighbor)
|
TEST_P(Test_TensorFlow_layers, resize_nearest_neighbor)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
runTensorFlowNet("resize_nearest_neighbor");
|
runTensorFlowNet("resize_nearest_neighbor");
|
||||||
}
|
}
|
||||||
TEST_P(Test_TensorFlow_layers, resize_nearest_neighbor_keras_upsampling2d)
|
TEST_P(Test_TensorFlow_layers, resize_nearest_neighbor_keras_upsampling2d)
|
||||||
@ -1586,14 +1544,7 @@ TEST_P(Test_TensorFlow_layers, relu6)
|
|||||||
|
|
||||||
TEST_P(Test_TensorFlow_layers, subpixel)
|
TEST_P(Test_TensorFlow_layers, subpixel)
|
||||||
{
|
{
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
#if defined(INF_ENGINE_RELEASE)
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
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);
|
|
||||||
#elif defined(INF_ENGINE_RELEASE)
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER);
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH)
|
||||||
|
@ -288,20 +288,6 @@ TEST_P(Test_Torch_layers, net_normalize)
|
|||||||
if(backend == DNN_BACKEND_CUDA)
|
if(backend == DNN_BACKEND_CUDA)
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA); /* only L1 and L2 norms are supported */
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA); /* only L1 and L2 norms are supported */
|
||||||
|
|
||||||
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
|
|
||||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_CPU, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION);
|
|
||||||
// Cannot get memory!
|
|
||||||
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);
|
|
||||||
// Cannot get memory!
|
|
||||||
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16))
|
|
||||||
applyTestTag(target == DNN_TARGET_OPENCL ? CV_TEST_TAG_DNN_SKIP_IE_OPENCL : CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16,
|
|
||||||
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_VERSION
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
runTorchNet("net_normalize", "", false, true);
|
runTorchNet("net_normalize", "", false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2067,28 +2067,23 @@ static LRESULT CALLBACK HGToolbarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
|||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
{
|
{
|
||||||
LRESULT ret = CallWindowProc(window.toolbar.toolBarProc, hwnd, uMsg, wParam, lParam);
|
LRESULT ret = CallWindowProc(window.toolbar.toolBarProc, hwnd, uMsg, wParam, lParam);
|
||||||
int rows = (int)SendMessage(hwnd, TB_GETROWS, 0, 0);
|
|
||||||
|
|
||||||
if (window.toolbar.rows != rows)
|
auto& trakbars = window.toolbar.trackbars;
|
||||||
|
|
||||||
|
for (auto it = trakbars.begin(); it != trakbars.end(); ++it)
|
||||||
{
|
{
|
||||||
SendMessage(window.toolbar.toolbar, TB_BUTTONCOUNT, 0, 0);
|
auto trackbar = *it;
|
||||||
auto& trakbars = window.toolbar.trackbars;
|
CV_Assert(trackbar);
|
||||||
|
RECT rect = { 0 };
|
||||||
for (auto it = trakbars.begin(); it != trakbars.end(); ++it)
|
SendMessage(window.toolbar.toolbar, TB_GETITEMRECT,
|
||||||
{
|
(WPARAM)trackbar->id, (LPARAM)&rect);
|
||||||
auto trackbar = *it;
|
MoveWindow(trackbar->hwnd, rect.left + HG_BUDDY_WIDTH, rect.top,
|
||||||
CV_Assert(trackbar);
|
rect.right - rect.left - HG_BUDDY_WIDTH,
|
||||||
RECT rect = { 0 };
|
rect.bottom - rect.top, FALSE);
|
||||||
SendMessage(window.toolbar.toolbar, TB_GETITEMRECT,
|
MoveWindow(trackbar->buddy, rect.left, rect.top,
|
||||||
(WPARAM)trackbar->id, (LPARAM)&rect);
|
HG_BUDDY_WIDTH, rect.bottom - rect.top, FALSE);
|
||||||
MoveWindow(trackbar->hwnd, rect.left + HG_BUDDY_WIDTH, rect.top,
|
|
||||||
rect.right - rect.left - HG_BUDDY_WIDTH,
|
|
||||||
rect.bottom - rect.top, FALSE);
|
|
||||||
MoveWindow(trackbar->buddy, rect.left, rect.top,
|
|
||||||
HG_BUDDY_WIDTH, rect.bottom - rect.top, FALSE);
|
|
||||||
}
|
|
||||||
window.toolbar.rows = rows;
|
|
||||||
}
|
}
|
||||||
|
window.toolbar.rows = static_cast<int>(SendMessage(hwnd, TB_GETROWS, 0, 0));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2425,7 +2420,7 @@ std::shared_ptr<CvTrackbar> createTrackbar_(CvWindow& window, const std::string&
|
|||||||
/* Retrieve current buttons count */
|
/* Retrieve current buttons count */
|
||||||
int bcount = (int)SendMessage(window.toolbar.toolbar, TB_BUTTONCOUNT, 0, 0);
|
int bcount = (int)SendMessage(window.toolbar.toolbar, TB_BUTTONCOUNT, 0, 0);
|
||||||
|
|
||||||
if (bcount > 1)
|
if (bcount > 0)
|
||||||
{
|
{
|
||||||
/* If this is not the first button then we need to
|
/* If this is not the first button then we need to
|
||||||
separate it from the previous one */
|
separate it from the previous one */
|
||||||
@ -2469,7 +2464,7 @@ std::shared_ptr<CvTrackbar> createTrackbar_(CvWindow& window, const std::string&
|
|||||||
tbis.dwMask = TBIF_SIZE;
|
tbis.dwMask = TBIF_SIZE;
|
||||||
|
|
||||||
RECT rect = { 0 };
|
RECT rect = { 0 };
|
||||||
GetClientRect(window.hwnd, &rect);
|
GetClientRect(window.toolbar.toolbar, &rect);
|
||||||
tbis.cx = (unsigned short)(rect.right - rect.left);
|
tbis.cx = (unsigned short)(rect.right - rect.left);
|
||||||
|
|
||||||
SendMessage(window.toolbar.toolbar, TB_SETBUTTONINFO,
|
SendMessage(window.toolbar.toolbar, TB_SETBUTTONINFO,
|
||||||
@ -2481,7 +2476,7 @@ std::shared_ptr<CvTrackbar> createTrackbar_(CvWindow& window, const std::string&
|
|||||||
|
|
||||||
/* Create a slider */
|
/* Create a slider */
|
||||||
auto trackbar = std::make_shared<CvTrackbar>(window, trackbar_name);
|
auto trackbar = std::make_shared<CvTrackbar>(window, trackbar_name);
|
||||||
trackbar->id = bcount;
|
trackbar->id = tbs.idCommand;
|
||||||
window.toolbar.trackbars.push_back(trackbar);
|
window.toolbar.trackbars.push_back(trackbar);
|
||||||
|
|
||||||
auto slider_name = cv::format("Trackbar%p", trackbar.get());
|
auto slider_name = cv::format("Trackbar%p", trackbar.get());
|
||||||
|
@ -99,6 +99,7 @@ enum ImwriteFlags {
|
|||||||
IMWRITE_EXR_COMPRESSION = (3 << 4) + 1, /* 49 */ //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
|
IMWRITE_EXR_COMPRESSION = (3 << 4) + 1, /* 49 */ //!< override EXR compression type (ZIP_COMPRESSION = 3 is default)
|
||||||
IMWRITE_EXR_DWA_COMPRESSION_LEVEL = (3 << 4) + 2, /* 50 */ //!< override EXR DWA compression level (45 is default)
|
IMWRITE_EXR_DWA_COMPRESSION_LEVEL = (3 << 4) + 2, /* 50 */ //!< override EXR DWA compression level (45 is default)
|
||||||
IMWRITE_WEBP_QUALITY = 64, //!< For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any parameter) and for quality above 100 the lossless compression is used.
|
IMWRITE_WEBP_QUALITY = 64, //!< For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any parameter) and for quality above 100 the lossless compression is used.
|
||||||
|
IMWRITE_HDR_COMPRESSION = (5 << 4) + 0, /* 80 */ //!< specify HDR compression
|
||||||
IMWRITE_PAM_TUPLETYPE = 128,//!< For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
|
IMWRITE_PAM_TUPLETYPE = 128,//!< For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
|
||||||
IMWRITE_TIFF_RESUNIT = 256,//!< For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
|
IMWRITE_TIFF_RESUNIT = 256,//!< For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
|
||||||
IMWRITE_TIFF_XDPI = 257,//!< For TIFF, use to specify the X direction DPI
|
IMWRITE_TIFF_XDPI = 257,//!< For TIFF, use to specify the X direction DPI
|
||||||
@ -161,6 +162,12 @@ enum ImwritePAMFlags {
|
|||||||
IMWRITE_PAM_FORMAT_RGB_ALPHA = 5
|
IMWRITE_PAM_FORMAT_RGB_ALPHA = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key
|
||||||
|
enum ImwriteHDRCompressionFlags {
|
||||||
|
IMWRITE_HDR_COMPRESSION_NONE = 0,
|
||||||
|
IMWRITE_HDR_COMPRESSION_RLE = 1
|
||||||
|
};
|
||||||
|
|
||||||
//! @} imgcodecs_flags
|
//! @} imgcodecs_flags
|
||||||
|
|
||||||
/** @brief Loads an image from a file.
|
/** @brief Loads an image from a file.
|
||||||
|
@ -141,14 +141,28 @@ bool HdrEncoder::write( const Mat& input_img, const std::vector<int>& params )
|
|||||||
if(img.depth() != CV_32F) {
|
if(img.depth() != CV_32F) {
|
||||||
img.convertTo(img, CV_32FC3, 1/255.0f);
|
img.convertTo(img, CV_32FC3, 1/255.0f);
|
||||||
}
|
}
|
||||||
CV_Assert(params.empty() || params[0] == HDR_NONE || params[0] == HDR_RLE);
|
|
||||||
|
int compression = IMWRITE_HDR_COMPRESSION_RLE;
|
||||||
|
for (size_t i = 0; i + 1 < params.size(); i += 2)
|
||||||
|
{
|
||||||
|
switch (params[i])
|
||||||
|
{
|
||||||
|
case IMWRITE_HDR_COMPRESSION:
|
||||||
|
compression = params[i + 1];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CV_Check(compression, compression == IMWRITE_HDR_COMPRESSION_NONE || compression == IMWRITE_HDR_COMPRESSION_RLE, "");
|
||||||
|
|
||||||
FILE *fout = fopen(m_filename.c_str(), "wb");
|
FILE *fout = fopen(m_filename.c_str(), "wb");
|
||||||
if(!fout) {
|
if(!fout) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
RGBE_WriteHeader(fout, img.cols, img.rows, NULL);
|
RGBE_WriteHeader(fout, img.cols, img.rows, NULL);
|
||||||
if(params.empty() || params[0] == HDR_RLE) {
|
if (compression == IMWRITE_HDR_COMPRESSION_RLE) {
|
||||||
RGBE_WritePixels_RLE(fout, const_cast<float*>(img.ptr<float>()), img.cols, img.rows);
|
RGBE_WritePixels_RLE(fout, const_cast<float*>(img.ptr<float>()), img.cols, img.rows);
|
||||||
} else {
|
} else {
|
||||||
RGBE_WritePixels(fout, const_cast<float*>(img.ptr<float>()), img.cols * img.rows);
|
RGBE_WritePixels(fout, const_cast<float*>(img.ptr<float>()), img.cols * img.rows);
|
||||||
|
@ -50,12 +50,6 @@
|
|||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
|
|
||||||
enum HdrCompression
|
|
||||||
{
|
|
||||||
HDR_NONE = 0,
|
|
||||||
HDR_RLE = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
// Radiance rgbe (.hdr) reader
|
// Radiance rgbe (.hdr) reader
|
||||||
class HdrDecoder CV_FINAL : public BaseImageDecoder
|
class HdrDecoder CV_FINAL : public BaseImageDecoder
|
||||||
{
|
{
|
||||||
|
@ -682,7 +682,7 @@ size_t imcount(const String& filename, int flags)
|
|||||||
|
|
||||||
|
|
||||||
static bool imwrite_( const String& filename, const std::vector<Mat>& img_vec,
|
static bool imwrite_( const String& filename, const std::vector<Mat>& img_vec,
|
||||||
const std::vector<int>& params, bool flipv )
|
const std::vector<int>& params_, bool flipv )
|
||||||
{
|
{
|
||||||
bool isMultiImg = img_vec.size() > 1;
|
bool isMultiImg = img_vec.size() > 1;
|
||||||
std::vector<Mat> write_vec;
|
std::vector<Mat> write_vec;
|
||||||
@ -716,7 +716,27 @@ static bool imwrite_( const String& filename, const std::vector<Mat>& img_vec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
encoder->setDestination( filename );
|
encoder->setDestination( filename );
|
||||||
CV_Assert(params.size() <= CV_IO_MAX_IMAGE_PARAMS*2);
|
#if CV_VERSION_MAJOR < 5 && defined(HAVE_IMGCODEC_HDR)
|
||||||
|
bool fixed = false;
|
||||||
|
std::vector<int> params_pair(2);
|
||||||
|
if (dynamic_cast<HdrEncoder*>(encoder.get()))
|
||||||
|
{
|
||||||
|
if (params_.size() == 1)
|
||||||
|
{
|
||||||
|
CV_LOG_WARNING(NULL, "imwrite() accepts key-value pair of parameters, but single value is passed. "
|
||||||
|
"HDR encoder behavior has been changed, please use IMWRITE_HDR_COMPRESSION key.");
|
||||||
|
params_pair[0] = IMWRITE_HDR_COMPRESSION;
|
||||||
|
params_pair[1] = params_[0];
|
||||||
|
fixed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const std::vector<int>& params = fixed ? params_pair : params_;
|
||||||
|
#else
|
||||||
|
const std::vector<int>& params = params_;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CV_Check(params.size(), (params.size() & 1) == 0, "Encoding 'params' must be key-value pairs");
|
||||||
|
CV_CheckLE(params.size(), (size_t)(CV_IO_MAX_IMAGE_PARAMS*2), "");
|
||||||
bool code = false;
|
bool code = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1081,7 +1101,7 @@ bool imdecodemulti(InputArray _buf, int flags, CV_OUT std::vector<Mat>& mats)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool imencode( const String& ext, InputArray _image,
|
bool imencode( const String& ext, InputArray _image,
|
||||||
std::vector<uchar>& buf, const std::vector<int>& params )
|
std::vector<uchar>& buf, const std::vector<int>& params_ )
|
||||||
{
|
{
|
||||||
CV_TRACE_FUNCTION();
|
CV_TRACE_FUNCTION();
|
||||||
|
|
||||||
@ -1103,6 +1123,28 @@ bool imencode( const String& ext, InputArray _image,
|
|||||||
image = temp;
|
image = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CV_VERSION_MAJOR < 5 && defined(HAVE_IMGCODEC_HDR)
|
||||||
|
bool fixed = false;
|
||||||
|
std::vector<int> params_pair(2);
|
||||||
|
if (dynamic_cast<HdrEncoder*>(encoder.get()))
|
||||||
|
{
|
||||||
|
if (params_.size() == 1)
|
||||||
|
{
|
||||||
|
CV_LOG_WARNING(NULL, "imwrite() accepts key-value pair of parameters, but single value is passed. "
|
||||||
|
"HDR encoder behavior has been changed, please use IMWRITE_HDR_COMPRESSION key.");
|
||||||
|
params_pair[0] = IMWRITE_HDR_COMPRESSION;
|
||||||
|
params_pair[1] = params_[0];
|
||||||
|
fixed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const std::vector<int>& params = fixed ? params_pair : params_;
|
||||||
|
#else
|
||||||
|
const std::vector<int>& params = params_;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CV_Check(params.size(), (params.size() & 1) == 0, "Encoding 'params' must be key-value pairs");
|
||||||
|
CV_CheckLE(params.size(), (size_t)(CV_IO_MAX_IMAGE_PARAMS*2), "");
|
||||||
|
|
||||||
bool code;
|
bool code;
|
||||||
if( encoder->setDestination(buf) )
|
if( encoder->setDestination(buf) )
|
||||||
{
|
{
|
||||||
|
@ -343,21 +343,45 @@ TEST(Imgcodecs_Hdr, regression)
|
|||||||
Mat img_no_rle = imread(name_no_rle, -1);
|
Mat img_no_rle = imread(name_no_rle, -1);
|
||||||
ASSERT_FALSE(img_no_rle.empty()) << "Could not open " << name_no_rle;
|
ASSERT_FALSE(img_no_rle.empty()) << "Could not open " << name_no_rle;
|
||||||
|
|
||||||
double min = 0.0, max = 1.0;
|
EXPECT_EQ(cvtest::norm(img_rle, img_no_rle, NORM_INF), 0.0);
|
||||||
minMaxLoc(abs(img_rle - img_no_rle), &min, &max);
|
|
||||||
ASSERT_FALSE(max > DBL_EPSILON);
|
|
||||||
string tmp_file_name = tempfile(".hdr");
|
string tmp_file_name = tempfile(".hdr");
|
||||||
vector<int>param(1);
|
vector<int> param(2);
|
||||||
|
param[0] = IMWRITE_HDR_COMPRESSION;
|
||||||
for(int i = 0; i < 2; i++) {
|
for(int i = 0; i < 2; i++) {
|
||||||
param[0] = i;
|
param[1] = i;
|
||||||
imwrite(tmp_file_name, img_rle, param);
|
imwrite(tmp_file_name, img_rle, param);
|
||||||
Mat written_img = imread(tmp_file_name, -1);
|
Mat written_img = imread(tmp_file_name, -1);
|
||||||
ASSERT_FALSE(written_img.empty()) << "Could not open " << tmp_file_name;
|
EXPECT_EQ(cvtest::norm(written_img, img_rle, NORM_INF), 0.0);
|
||||||
minMaxLoc(abs(img_rle - written_img), &min, &max);
|
|
||||||
ASSERT_FALSE(max > DBL_EPSILON);
|
|
||||||
}
|
}
|
||||||
remove(tmp_file_name.c_str());
|
remove(tmp_file_name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Imgcodecs_Hdr, regression_imencode)
|
||||||
|
{
|
||||||
|
string folder = string(cvtest::TS::ptr()->get_data_path()) + "/readwrite/";
|
||||||
|
string name = folder + "rle.hdr";
|
||||||
|
Mat img_ref = imread(name, -1);
|
||||||
|
ASSERT_FALSE(img_ref.empty()) << "Could not open " << name;
|
||||||
|
|
||||||
|
vector<int> params(2);
|
||||||
|
params[0] = IMWRITE_HDR_COMPRESSION;
|
||||||
|
{
|
||||||
|
vector<uchar> buf;
|
||||||
|
params[1] = IMWRITE_HDR_COMPRESSION_NONE;
|
||||||
|
imencode(".hdr", img_ref, buf, params);
|
||||||
|
Mat img = imdecode(buf, -1);
|
||||||
|
EXPECT_EQ(cvtest::norm(img_ref, img, NORM_INF), 0.0);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
vector<uchar> buf;
|
||||||
|
params[1] = IMWRITE_HDR_COMPRESSION_RLE;
|
||||||
|
imencode(".hdr", img_ref, buf, params);
|
||||||
|
Mat img = imdecode(buf, -1);
|
||||||
|
EXPECT_EQ(cvtest::norm(img_ref, img, NORM_INF), 0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_IMGCODEC_PXM
|
#ifdef HAVE_IMGCODEC_PXM
|
||||||
|
@ -480,4 +480,24 @@ TEST(ImgCodecs, multipage_collection_two_iterator_operatorpp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(Imgcodecs_Params, imwrite_regression_22752)
|
||||||
|
{
|
||||||
|
const Mat img(16, 16, CV_8UC3, cv::Scalar::all(0));
|
||||||
|
vector<int> params;
|
||||||
|
params.push_back(IMWRITE_JPEG_QUALITY);
|
||||||
|
// params.push_back(100)); // Forget it.
|
||||||
|
EXPECT_ANY_THROW(cv::imwrite("test.jpg", img, params)); // parameters size or missing JPEG codec
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Imgcodecs_Params, imencode_regression_22752)
|
||||||
|
{
|
||||||
|
const Mat img(16, 16, CV_8UC3, cv::Scalar::all(0));
|
||||||
|
vector<int> params;
|
||||||
|
params.push_back(IMWRITE_JPEG_QUALITY);
|
||||||
|
// params.push_back(100)); // Forget it.
|
||||||
|
vector<uchar> buf;
|
||||||
|
EXPECT_ANY_THROW(cv::imencode("test.jpg", img, buf, params)); // parameters size or missing JPEG codec
|
||||||
|
}
|
||||||
|
|
||||||
}} // namespace
|
}} // namespace
|
||||||
|
@ -104,6 +104,10 @@ inline int dstChannels(int code)
|
|||||||
return 4;
|
return 4;
|
||||||
|
|
||||||
case COLOR_BGRA2BGR: case COLOR_RGBA2BGR: case COLOR_RGB2BGR:
|
case COLOR_BGRA2BGR: case COLOR_RGBA2BGR: case COLOR_RGB2BGR:
|
||||||
|
case COLOR_HSV2RGB: case COLOR_HSV2BGR: case COLOR_RGB2HSV: case COLOR_BGR2HSV:
|
||||||
|
case COLOR_HLS2RGB: case COLOR_HLS2BGR: case COLOR_RGB2HLS: case COLOR_BGR2HLS:
|
||||||
|
case COLOR_HSV2RGB_FULL: case COLOR_HSV2BGR_FULL: case COLOR_RGB2HSV_FULL: case COLOR_BGR2HSV_FULL:
|
||||||
|
case COLOR_HLS2RGB_FULL: case COLOR_HLS2BGR_FULL: case COLOR_RGB2HLS_FULL: case COLOR_BGR2HLS_FULL:
|
||||||
case COLOR_YUV2RGB: case COLOR_YUV2BGR: case COLOR_RGB2YUV: case COLOR_BGR2YUV:
|
case COLOR_YUV2RGB: case COLOR_YUV2BGR: case COLOR_RGB2YUV: case COLOR_BGR2YUV:
|
||||||
case COLOR_BGR5652BGR: case COLOR_BGR5552BGR: case COLOR_BGR5652RGB: case COLOR_BGR5552RGB:
|
case COLOR_BGR5652BGR: case COLOR_BGR5552BGR: case COLOR_BGR5652RGB: case COLOR_BGR5552RGB:
|
||||||
case COLOR_GRAY2BGR:
|
case COLOR_GRAY2BGR:
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
//International Conference Pattern Recognition, UK, August, 2004
|
//International Conference Pattern Recognition, UK, August, 2004
|
||||||
//http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf
|
//http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf
|
||||||
//The code is very fast and performs also shadow detection.
|
//The code is very fast and performs also shadow detection.
|
||||||
//Number of Gausssian components is adapted per pixel.
|
//Number of Gaussian components is adapted per pixel.
|
||||||
//
|
//
|
||||||
// and
|
// and
|
||||||
//
|
//
|
||||||
@ -97,7 +97,7 @@ namespace cv
|
|||||||
http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf
|
http://www.zoranz.net/Publications/zivkovic2004ICPR.pdf
|
||||||
|
|
||||||
Advantages:
|
Advantages:
|
||||||
-fast - number of Gausssian components is constantly adapted per pixel.
|
-fast - number of Gaussian components is constantly adapted per pixel.
|
||||||
-performs also shadow detection (see bgfg_segm_test.cpp example)
|
-performs also shadow detection (see bgfg_segm_test.cpp example)
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user