|
|
|
@ -345,9 +345,12 @@ TEST_P(Test_ONNX_layers, Div) |
|
|
|
|
net.setPreferableBackend(backend); |
|
|
|
|
net.setPreferableTarget(target); |
|
|
|
|
|
|
|
|
|
Mat inp1 = blobFromNPY(_tf("data/input_div_0.npy")); |
|
|
|
|
Mat inp2 = blobFromNPY(_tf("data/input_div_1.npy")); |
|
|
|
|
// Reference output values range is -68.80928, 2.991873. So to avoid computational
|
|
|
|
|
// difference for FP16 we'll perform reversed division (just swap inputs).
|
|
|
|
|
Mat inp1 = blobFromNPY(_tf("data/input_div_1.npy")); |
|
|
|
|
Mat inp2 = blobFromNPY(_tf("data/input_div_0.npy")); |
|
|
|
|
Mat ref = blobFromNPY(_tf("data/output_div.npy")); |
|
|
|
|
cv::divide(1.0, ref, ref); |
|
|
|
|
checkBackend(&inp1, &ref); |
|
|
|
|
|
|
|
|
|
net.setInput(inp1, "0"); |
|
|
|
@ -448,6 +451,9 @@ TEST_P(Test_ONNX_nets, Googlenet) |
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER); |
|
|
|
|
|
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
|
|
|
|
|
const String model = _tf("models/googlenet.onnx", false); |
|
|
|
|
|
|
|
|
|
Net net = readNetFromONNX(model); |
|
|
|
@ -491,7 +497,7 @@ TEST_P(Test_ONNX_nets, RCNN_ILSVRC13) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_VERSION); |
|
|
|
|
#endif |
|
|
|
|
// Reference output values are in range [-4.992, -1.161]
|
|
|
|
|
testONNXModels("rcnn_ilsvrc13", pb, 0.0045); |
|
|
|
|
testONNXModels("rcnn_ilsvrc13", pb, 0.0046); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TEST_P(Test_ONNX_nets, VGG16_bn) |
|
|
|
@ -558,10 +564,12 @@ TEST_P(Test_ONNX_nets, TinyYolov2) |
|
|
|
|
) |
|
|
|
|
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_NN_BUILDER); |
|
|
|
|
|
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target == DNN_TARGET_MYRIAD |
|
|
|
|
&& getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X |
|
|
|
|
if (target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X |
|
|
|
|
) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER); |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, |
|
|
|
|
backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 ? |
|
|
|
|
CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER : |
|
|
|
|
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// output range: [-11; 8]
|
|
|
|
@ -594,6 +602,12 @@ TEST_P(Test_ONNX_nets, LResNet100E_IR) |
|
|
|
|
if (target == DNN_TARGET_OPENCL) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL, 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); |
|
|
|
|
} |
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) |
|
|
|
|
{ |
|
|
|
|
if (target == DNN_TARGET_OPENCL_FP16) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
if (target == DNN_TARGET_OPENCL) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_OPENCL, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
if (target == DNN_TARGET_MYRIAD) applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
double l1 = default_l1; |
|
|
|
|
double lInf = default_lInf; |
|
|
|
@ -612,10 +626,11 @@ TEST_P(Test_ONNX_nets, LResNet100E_IR) |
|
|
|
|
TEST_P(Test_ONNX_nets, Emotion_ferplus) |
|
|
|
|
{ |
|
|
|
|
#if defined(INF_ENGINE_RELEASE) |
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target == DNN_TARGET_MYRIAD |
|
|
|
|
&& getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X |
|
|
|
|
) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER); |
|
|
|
|
if (target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X, |
|
|
|
|
backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 ? |
|
|
|
|
CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER : |
|
|
|
|
CV_TEST_TAG_DNN_SKIP_IE_NGRAPH); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
double l1 = default_l1; |
|
|
|
@ -652,7 +667,8 @@ TEST_P(Test_ONNX_nets, DenseNet121) |
|
|
|
|
TEST_P(Test_ONNX_nets, Inception_v1) |
|
|
|
|
{ |
|
|
|
|
#if defined(INF_ENGINE_RELEASE) |
|
|
|
|
if (backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && target == DNN_TARGET_MYRIAD) |
|
|
|
|
if ((backend == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || |
|
|
|
|
backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && target == DNN_TARGET_MYRIAD) |
|
|
|
|
applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_MYRIAD); |
|
|
|
|
#endif |
|
|
|
|
testONNXModels("inception_v1", pb); |
|
|
|
|