mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1,16 +1,7 @@
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
static const char* extraTestDataPath =
|
||||
#ifdef WINRT
|
||||
NULL;
|
||||
#else
|
||||
getenv("OPENCV_DNN_TEST_DATA_PATH");
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_HPX)
|
||||
#include <hpx/hpx_main.hpp>
|
||||
#endif
|
||||
|
||||
CV_PERF_TEST_MAIN(dnn,
|
||||
extraTestDataPath ? (void)cvtest::addDataSearchPath(extraTestDataPath) : (void)0
|
||||
)
|
||||
CV_PERF_TEST_MAIN(dnn, cvtest::addDataSearchEnv("OPENCV_DNN_TEST_DATA_PATH"))
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#endif
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include "opencv2/core/utils/configuration.private.hpp"
|
||||
|
||||
#ifndef CV_OCL4DNN
|
||||
#define CV_OCL4DNN 0
|
||||
@@ -89,4 +90,4 @@
|
||||
#include <opencv2/dnn/all_layers.hpp>
|
||||
#include <opencv2/dnn/shape_utils.hpp>
|
||||
|
||||
#include "dnn_common.hpp"
|
||||
#include "dnn_common.hpp"
|
||||
|
||||
@@ -115,21 +115,12 @@ bool loadVulkanLibrary()
|
||||
if (handle != nullptr)
|
||||
return true;
|
||||
|
||||
const char* path;
|
||||
const char* envPath = getenv("OPENCV_VULKAN_RUNTIME");
|
||||
if (envPath)
|
||||
{
|
||||
path = envPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
path = DEFAULT_VK_LIBRARY_PATH;
|
||||
}
|
||||
const std::string path = cv::utils::getConfigurationParameterString("OPENCV_VULKAN_RUNTIME", DEFAULT_VK_LIBRARY_PATH);
|
||||
|
||||
handle = LOAD_VK_LIBRARY(path);
|
||||
handle = LOAD_VK_LIBRARY(path.c_str());
|
||||
if( handle == nullptr )
|
||||
{
|
||||
fprintf(stderr, "Could not load Vulkan library: %s!\n", path);
|
||||
fprintf(stderr, "Could not load Vulkan library: %s!\n", path.c_str());
|
||||
fprintf(stderr, "Please download the Vulkan SDK and set the environment variable of OPENCV_VULKAN_RUNTIME according "
|
||||
"to your system environment.\n");
|
||||
fprintf(stderr, "For M1 Mac and IOS, we use MoltenVK to map the Vulkan code to native apple Metal code.\n");
|
||||
|
||||
@@ -430,14 +430,7 @@ bool validateVPUType()
|
||||
|
||||
void initDNNTests()
|
||||
{
|
||||
const char* extraTestDataPath =
|
||||
#ifdef WINRT
|
||||
NULL;
|
||||
#else
|
||||
getenv("OPENCV_DNN_TEST_DATA_PATH");
|
||||
#endif
|
||||
if (extraTestDataPath)
|
||||
cvtest::addDataSearchPath(extraTestDataPath);
|
||||
cvtest::addDataSearchEnv("OPENCV_DNN_TEST_DATA_PATH");
|
||||
|
||||
registerGlobalSkipTag(
|
||||
CV_TEST_TAG_DNN_SKIP_OPENCV_BACKEND,
|
||||
|
||||
@@ -40,15 +40,11 @@ static void initDLDTDataPath()
|
||||
if (!initialized)
|
||||
{
|
||||
#if INF_ENGINE_RELEASE <= 2018050000
|
||||
const char* dldtTestDataPath = getenv("INTEL_CVSDK_DIR");
|
||||
if (dldtTestDataPath)
|
||||
cvtest::addDataSearchPath(dldtTestDataPath);
|
||||
cvtest::addDataSearchEnv("INTEL_CVSDK_DIR");
|
||||
#else
|
||||
const char* omzDataPath = getenv("OPENCV_OPEN_MODEL_ZOO_DATA_PATH");
|
||||
if (omzDataPath)
|
||||
cvtest::addDataSearchPath(omzDataPath);
|
||||
const char* dnnDataPath = getenv("OPENCV_DNN_TEST_DATA_PATH");
|
||||
if (dnnDataPath)
|
||||
cvtest::addDataSearchEnv("OPENCV_OPEN_MODEL_ZOO_DATA_PATH");
|
||||
const std::string dnnDataPath = cv::utils::getConfigurationParameterString("OPENCV_DNN_TEST_DATA_PATH");
|
||||
if (!dnnDataPath.empty())
|
||||
cvtest::addDataSearchPath(std::string(dnnDataPath) + "/omz_intel_models");
|
||||
#endif
|
||||
initialized = true;
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "opencv2/ts/ts_perf.hpp"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#include "opencv2/core/ocl.hpp"
|
||||
#include "opencv2/core/utils/configuration.private.hpp"
|
||||
|
||||
#include "opencv2/dnn.hpp"
|
||||
#include "test_common.hpp"
|
||||
|
||||
Reference in New Issue
Block a user