From 512632e5743ce4599b42c2eb277efa80fb5407af Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Wed, 11 Apr 2018 14:38:05 +0300 Subject: [PATCH] Parse repeated values of ConvolutionParameter --- modules/dnn/src/layers/layers_common.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/dnn/src/layers/layers_common.cpp b/modules/dnn/src/layers/layers_common.cpp index f854d91ccc..bf5834c864 100644 --- a/modules/dnn/src/layers/layers_common.cpp +++ b/modules/dnn/src/layers/layers_common.cpp @@ -77,7 +77,20 @@ bool getParameter(const LayerParams ¶ms, const std::string& nameBase, const { if (params.has(nameAll_)) { - parameterH = parameterW = params.get(nameAll_); + DictValue param = params.get(nameAll_); + parameterH = param.get(0); + if (param.size() == 1) + { + parameterW = parameterH; + } + else if (param.size() == 2) + { + parameterW = param.get(1); + } + else + { + return false; + } return true; } else