1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Dale Phurrough 705e7b207c fix missing addref() in ocl::Context::create(str)
backported fix from PR 18907
2020-11-24 14:08:29 +03:00
Joe ea91f7e57d Fix Reduce Mean error for MobileNets DNN
Fix for index error for Reduce Mean

Correct Reduce Mean indexing error
2020-11-23 20:40:30 +03:00
Liubov Batanina decdb68636 Fixed Test_Model.DetectionOutput 2020-11-19 14:02:02 +03:00
Alexander Alekhin d4cc7f4299 OpenCV version '-openvino' 2020-11-18 14:23:49 +03:00
Alexander Alekhin 4699d2ba0c dnn: use OpenVINO 2021.2 defines 2020-11-18 14:23:49 +03:00
7 changed files with 19 additions and 12 deletions
+2 -2
View File
@@ -129,9 +129,9 @@ endif()
if(INF_ENGINE_TARGET)
if(NOT INF_ENGINE_RELEASE)
message(WARNING "InferenceEngine version has not been set, 2021.1 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
message(WARNING "InferenceEngine version has not been set, 2021.2 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
endif()
set(INF_ENGINE_RELEASE "2021010000" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
set(INF_ENGINE_RELEASE "2021020000" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
set_target_properties(${INF_ENGINE_TARGET} PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "HAVE_INF_ENGINE=1;INF_ENGINE_RELEASE=${INF_ENGINE_RELEASE}"
)
@@ -8,7 +8,7 @@
#define CV_VERSION_MAJOR 4
#define CV_VERSION_MINOR 5
#define CV_VERSION_REVISION 1
#define CV_VERSION_STATUS "-pre"
#define CV_VERSION_STATUS "-openvino"
#define CVAUX_STR_EXP(__A) #__A
#define CVAUX_STR(__A) CVAUX_STR_EXP(__A)
+1
View File
@@ -2437,6 +2437,7 @@ public:
if (impl)
{
CV_LOG_INFO(NULL, "OpenCL: reuse context@" << impl->contextId << " for configuration: " << configuration)
impl->addref();
return impl;
}
+1 -1
View File
@@ -100,7 +100,7 @@ public:
// Faster-RCNN or R-FCN
if (net.getLayer(0)->outputNameToIndex("im_info") != -1)
{
Mat imInfo(Matx31f(size.height, size.width, 1.6f));
Mat imInfo(Matx13f(size.height, size.width, 1.6f));
net.setInput(imInfo, "im_info");
}
net.forward(outs, outNames);
+9 -6
View File
@@ -500,14 +500,17 @@ void ONNXImporter::handleNode(const opencv_onnx::NodeProto& node_proto_)
MatShape inpShape = outShapes[node_proto.input(0)];
DictValue axes = layerParams.get("axes");
bool keepdims = layerParams.get<int>("keepdims");
MatShape targetShape = inpShape;
MatShape targetShape;
std::vector<bool> shouldDelete(inpShape.size(), false);
for (int i = 0; i < axes.size(); i++) {
int axis = clamp(axes.get<int>(i), inpShape.size());
if (keepdims) {
targetShape[axis] = 1;
} else {
targetShape.erase(targetShape.begin() + axis);
}
shouldDelete[axis] = true;
}
for (int axis = 0; axis < inpShape.size(); ++axis){
if (!shouldDelete[axis])
targetShape.push_back(inpShape[axis]);
else if (keepdims)
targetShape.push_back(1);
}
if (inpShape.size() == 3 && axes.size() <= 2)
+3 -2
View File
@@ -28,10 +28,11 @@
#define INF_ENGINE_RELEASE_2020_3 2020030000
#define INF_ENGINE_RELEASE_2020_4 2020040000
#define INF_ENGINE_RELEASE_2021_1 2021010000
#define INF_ENGINE_RELEASE_2021_2 2021020000
#ifndef INF_ENGINE_RELEASE
#warning("IE version have not been provided via command-line. Using 2021.1 by default")
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2021_1
#warning("IE version have not been provided via command-line. Using 2021.2 by default")
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2021_2
#endif
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
+2
View File
@@ -206,6 +206,8 @@ TEST_P(Test_Model, DetectionOutput)
{
if (backend == DNN_BACKEND_OPENCV)
scoreDiff = 4e-3;
else
scoreDiff = 2e-2;
iouDiff = 1.8e-1;
}