TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe_Different_Width_Height) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); #if defined(INF_ENGINE_RELEASE) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X) throw SkipTestException("Test is disabled for MyriadX"); #endif Mat sample = imread(findDataFile("dnn/street.png", false)); Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 560), Scalar(127.5, 127.5, 127.5), false); float diffScores = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.029 : 0.0; float diffSquares = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.09 : 0.0; processNet("dnn/MobileNetSSD_deploy.caffemodel", "dnn/MobileNetSSD_deploy.prototxt", inp, "detection_out", "", diffScores, diffSquares); expectNoFallbacksFromIE(net); }
TEST_P(DNNTestNetwork, MobileNet_SSD_v1_TensorFlow_Different_Width_Height) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); #if defined(INF_ENGINE_RELEASE) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X) throw SkipTestException("Test is disabled for MyriadX"); #endif Mat sample = imread(findDataFile("dnn/street.png", false)); Mat inp = blobFromImage(sample, 1.0f, Size(300, 560), Scalar(), false); float l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.012 : 0.0; float lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.06 : 0.0; processNet("dnn/ssd_mobilenet_v1_coco_2017_11_17.pb", "dnn/ssd_mobilenet_v1_coco_2017_11_17.pbtxt", inp, "detection_out", "", l1, lInf); expectNoFallbacksFromIE(net); }
TEST_P(Test_Darknet_layers, shortcut) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE < 2018040000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_CPU) throw SkipTestException("Test is enabled starts from OpenVINO 2018R4"); #endif testDarknetLayer("shortcut"); }
TEST_P(DNNTestNetwork, opencv_face_detector) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); Mat img = imread(findDataFile("gpu/lbpcascade/er.png", false)); Mat inp = blobFromImage(img, 1.0, Size(), Scalar(104.0, 177.0, 123.0), false, false); processNet("dnn/opencv_face_detector.caffemodel", "dnn/opencv_face_detector.prototxt", inp, "detection_out"); }
PERF_TEST_P_(DNNTestNetwork, OpenPose_pose_mpi_faster_4_stages) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); // The same .caffemodel but modified .prototxt // See https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/src/openpose/pose/poseParameters.cpp processNet("dnn/openpose_pose_mpi.caffemodel", "dnn/openpose_pose_mpi_faster_4_stages.prototxt", "", Mat(cv::Size(368, 368), CV_32FC3), "", "caffe"); }
void TestExcelAttachedDocument::TestSave() { if (isPASubstDrive()) // CH 12/10/07 { throw SkipTestException(_T("Excel 'Save' does not work on a 'subst'ed P: drive - Test skipped")); } throw SkipTestException(_T("TODO: Find out why Save sometimes fails (output document open by someone else)")); Excel::_WorkbookPtr spWorkbook(m_spAttachedDocument); assertMessage(VARIANT_TRUE == spWorkbook->Saved, _T("Expected the workbook to be saved")); spWorkbook->Worksheets->Add(); assertMessage(VARIANT_FALSE == spWorkbook->Saved, _T("Expected the workbook to be unsaved after modification")); m_pDocument->Save(); assertMessage(VARIANT_TRUE == spWorkbook->Saved, _T("Expected the workbook to be saved after a call to save")); }
TEST_P(Test_TensorFlow_layers, unfused_flatten) { if (backend == DNN_BACKEND_INFERENCE_ENGINE && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16)) throw SkipTestException(""); runTensorFlowNet("unfused_flatten"); runTensorFlowNet("unfused_flatten_unknown_batch"); }
TEST_P(DNNTestNetwork, ENet) { if (backend == DNN_BACKEND_INFERENCE_ENGINE) throw SkipTestException(""); processNet("dnn/Enet-model-best.net", "", Size(512, 512), "l367_Deconvolution", target == DNN_TARGET_OPENCL ? "dnn/halide_scheduler_opencl_enet.yml" : "dnn/halide_scheduler_enet.yml", 2e-5, 0.15); }
TEST_P(DNNTestNetwork, SSD_VGG16) { if (backend == DNN_BACKEND_DEFAULT && target == DNN_TARGET_OPENCL || backend == DNN_BACKEND_HALIDE && target == DNN_TARGET_CPU) throw SkipTestException(""); processNet("dnn/VGG_ILSVRC2016_SSD_300x300_iter_440000.caffemodel", "dnn/ssd_vgg16.prototxt", Size(300, 300), "detection_out", "caffe"); }
TEST_P(Test_Torch_layers, net_conv_gemm_lrn) { if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException(""); runTorchNet("net_conv_gemm_lrn", "", false, true, target == DNN_TARGET_OPENCL_FP16 ? 0.046 : 0.0, target == DNN_TARGET_OPENCL_FP16 ? 0.023 : 0.0); }
TEST_P(Test_ONNX_nets, Inception_v1) { #if defined(INF_ENGINE_RELEASE) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for Myriad targets"); #endif testONNXModels("inception_v1", pb); }
TEST_P(Test_Torch_layers, net_inception_block) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018030000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException(""); #endif runTorchNet("net_inception_block", "", false, true); }
TEST_P(DNNTestNetwork, OpenFace) { #if defined(INF_ENGINE_RELEASE) #if INF_ENGINE_VER_MAJOR_EQ(2018050000) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for Myriad targets"); #elif INF_ENGINE_VER_MAJOR_EQ(2018030000) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL_FP16) throw SkipTestException("Test has been fixed in OpenVINO 2018R4"); #endif #endif if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); const float l1 = (target == DNN_TARGET_MYRIAD) ? 0.0024 : 0.0; const float lInf = (target == DNN_TARGET_MYRIAD) ? 0.0071 : 0.0; processNet("dnn/openface_nn4.small2.v1.t7", "", Size(96, 96), "", "", l1, lInf); }
TEST_P(Test_Torch_layers, run_deconv) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018040000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for OpenVINO 2018R4"); #endif runTorchNet("net_deconv"); }
TEST_P(Test_TensorFlow_layers, lstm) { if (backend == DNN_BACKEND_INFERENCE_ENGINE || (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)) throw SkipTestException(""); runTensorFlowNet("lstm", true); runTensorFlowNet("lstm", true, 0.0, 0.0, true); }
TEST_P(DNNTestNetwork, Inception_v2_SSD_TensorFlow) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); Mat sample = imread(findDataFile("dnn/street.png", false)); Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), false); processNet("dnn/ssd_inception_v2_coco_2017_11_17.pb", "dnn/ssd_inception_v2_coco_2017_11_17.pbtxt", inp, "detection_out"); }
TEST_P(Test_TensorFlow_layers, matmul) { if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) throw SkipTestException(""); runTensorFlowNet("matmul"); runTensorFlowNet("nhwc_reshape_matmul"); runTensorFlowNet("nhwc_transpose_reshape_matmul"); }
// TODO: fix tests and replace to pooling TEST_P(Test_TensorFlow_layers, ave_pool_same) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE < 2018030000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is enabled starts from OpenVINO 2018R3"); #endif runTensorFlowNet("ave_pool_same"); }
PERF_TEST_P_(DNNTestNetwork, MobileNet_SSD_TensorFlow) { if (backend == DNN_BACKEND_DEFAULT && target == DNN_TARGET_OPENCL || backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); processNet("dnn/ssd_mobilenet_v1_coco.pb", "ssd_mobilenet_v1_coco.pbtxt", "", Mat(cv::Size(300, 300), CV_32FC3), "", "tensorflow"); }
TEST_P(Test_ONNX_layers, Constant) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LE(2018050000) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X) throw SkipTestException("Test is disabled for OpenVINO <= 2018R5 + MyriadX target"); #endif testONNXModels("constant"); }
TEST_P(Test_Torch_layers, run_reshape) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018040000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is disabled for OpenVINO 2018R4"); #endif runTorchNet("net_reshape_batch"); runTorchNet("net_reshape_channels", "", false, true); }
TEST_P(DNNTestNetwork, MobileNet_SSD_Caffe) { if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); Mat sample = imread(findDataFile("dnn/street.png", false)); Mat inp = blobFromImage(sample, 1.0f / 127.5, Size(300, 300), Scalar(127.5, 127.5, 127.5), false); processNet("dnn/MobileNetSSD_deploy.caffemodel", "dnn/MobileNetSSD_deploy.prototxt", inp, "detection_out"); }
void TestFacadeDocumentProvider::TestAreTheseDifferentVersionsOfTheSameDocument() { throw SkipTestException(_T("Oh No!! Queryinterface doesn't work!!! Still under investigation!!!")); //IWSDocumentProvider7Ptr spProvider; //HRESULT hr = spProvider.CreateInstance("Workshare.FacadeDocumentProvider"); //assertMessage(FAILED(hr), "Failed to instantiate the \"Workshare.FacadeDocumentProvider\""); //VARIANT_BOOL result; //assertMessage(E_NOTIMPL == spProvider->raw_AreTheseDifferentVersionsOfTheSameDocument(L"", L"", &result), "Expect E_NOT_IMPL to be returned"); }
void TestFacadeDocumentProvider::TestGetCapabilities() { throw SkipTestException(_T("Cannot Queryinterface for IWSDocumentProvider6 on Workshare.FacadeDocumentProvider from within the TestHarness (can from elsewhere). Why, you ask. We don't know. But please tell us if you do.")); //IWSDocumentProvider6Ptr spDocProvider; //assertMessage(SUCCEEDED(spDocProvider.CreateInstance("Workshare.FacadeDocumentProvider")), "Failed to create an instance of Workshare.FacadeDocumentProvider"); //long capabilities = spDocProvider->GetCapabilities(L"", 0); //assertMessage(0 <= capabilities, "The capability flags cannot be a negative value"); }
TEST_P(Test_TensorFlow_layers, reshape) { if (backend == DNN_BACKEND_INFERENCE_ENGINE) throw SkipTestException(""); runTensorFlowNet("shift_reshape_no_reorder"); runTensorFlowNet("reshape_no_reorder"); runTensorFlowNet("reshape_reduce"); runTensorFlowNet("reshape_as_shape"); }
TEST_P(DNNTestNetwork, OpenPose_pose_mpi) { applyTestTag(CV_TEST_TAG_LONG, (target == DNN_TARGET_CPU ? CV_TEST_TAG_MEMORY_1GB : CV_TEST_TAG_MEMORY_2GB), CV_TEST_TAG_DEBUG_VERYLONG); if (backend == DNN_BACKEND_HALIDE) throw SkipTestException(""); #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_LE(2018050000) if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD && getInferenceEngineVPUType() == CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X) throw SkipTestException("Test is disabled for OpenVINO <= 2018R5 + MyriadX target"); #endif // output range: [-0.001, 0.97] const float l1 = (target == DNN_TARGET_MYRIAD) ? 0.012 : 0.0; const float lInf = (target == DNN_TARGET_MYRIAD || target == DNN_TARGET_OPENCL_FP16) ? 0.16 : 0.0; processNet("dnn/openpose_pose_mpi.caffemodel", "dnn/openpose_pose_mpi.prototxt", Size(46, 46), "", "", l1, lInf); expectNoFallbacksFromIE(net); }
TEST_P(Test_Torch_layers, net_residual) { #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE == 2018050000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16)) throw SkipTestException("Test is disabled for OpenVINO 2018R5"); #endif runTorchNet("net_residual", "", false, true); }
TEST_P(InterpolatorTest, MultiThreadReproducibility) { if (cv::getNumberOfCPUs() == 1) return; double MAX_DIF = 1.0; double MAX_MEAN_DIF = 1.0 / 256.0; int loopsCount = 2; RNG rng(0); InterpolatorParams params = GetParam(); Size size = get<0>(params); int guideType = get<1>(params); Mat from(size, guideType); randu(from, 0, 255); int num_matches = rng.uniform(5,SHRT_MAX-1); vector<Point2f> from_points; vector<Point2f> to_points; for(int i=0;i<num_matches;i++) { from_points.push_back(Point2f(rng.uniform(0.01f,(float)size.width-1.01f),rng.uniform(0.01f,(float)size.height-1.01f))); to_points.push_back(Point2f(rng.uniform(0.01f,(float)size.width-1.01f),rng.uniform(0.01f,(float)size.height-1.01f))); } int nThreads = cv::getNumThreads(); if (nThreads == 1) throw SkipTestException("Single thread environment"); for (int iter = 0; iter <= loopsCount; iter++) { int K = rng.uniform(4,512); float sigma = rng.uniform(0.01f,0.5f); float FGSlambda = rng.uniform(100.0f, 10000.0f); float FGSsigma = rng.uniform(0.5f, 100.0f); Ptr<EdgeAwareInterpolator> interpolator = createEdgeAwareInterpolator(); interpolator->setK(K); interpolator->setSigma(sigma); interpolator->setUsePostProcessing(true); interpolator->setFGSLambda(FGSlambda); interpolator->setFGSSigma(FGSsigma); cv::setNumThreads(nThreads); Mat resMultiThread; interpolator->interpolate(from,from_points,Mat(),to_points,resMultiThread); cv::setNumThreads(1); Mat resSingleThread; interpolator->interpolate(from,from_points,Mat(),to_points,resSingleThread); EXPECT_LE(cv::norm(resSingleThread, resMultiThread, NORM_INF), MAX_DIF); EXPECT_LE(cv::norm(resSingleThread, resMultiThread, NORM_L1) , MAX_MEAN_DIF*resMultiThread.total()); } }
// TODO: fix pad_and_concat and add this test case to fp16_weights TEST_P(Test_TensorFlow_layers, fp16_pad_and_concat) { const float l1 = 0.00071; const float lInf = 0.012; #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_RELEASE < 2018030000 if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) throw SkipTestException("Test is enabled starts from OpenVINO 2018R3"); #endif runTensorFlowNet("fp16_pad_and_concat", false, l1, lInf); }
void TestFacadeDocumentProvider::TestIsDmsInOfflineMode() { throw SkipTestException(_T("Oh No!! Queryinterface doesn't work!!! Still under investigation!!!")); //IWSDocumentProvider7Ptr spProvider; //HRESULT hr = spProvider.CreateInstance("Workshare.FacadeDocumentProvider"); //assertMessage(FAILED(hr), "Failed to instantiate the \"Workshare.FacadeDocumentProvider\""); //VARIANT_BOOL result; //assertMessage(S_OK == spProvider->raw_IsDmsInOfflineMode(L"", &result), "Expect S_OK to be returned"); //assertMessage(VARIANT_FALSE == result, "Expect VARIANT_FALSE to be returned"); }