Skip to content

Commit 4857cae

Browse files
committed
dnn: don't use "experimental_dnn_v1" namespace directly
1 parent 1ba29cc commit 4857cae

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

modules/dnn/src/darknet/darknet_io.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ namespace cv {
103103

104104
void setLayerBlobs(int i, std::vector<cv::Mat> blobs)
105105
{
106-
cv::dnn::experimental_dnn_v1::LayerParams &params = net->layers[i].layerParams;
106+
cv::dnn::LayerParams &params = net->layers[i].layerParams;
107107
params.blobs = blobs;
108108
}
109109

110-
cv::dnn::experimental_dnn_v1::LayerParams getParamConvolution(int kernel, int pad,
110+
cv::dnn::LayerParams getParamConvolution(int kernel, int pad,
111111
int stride, int filters_num)
112112
{
113-
cv::dnn::experimental_dnn_v1::LayerParams params;
113+
cv::dnn::LayerParams params;
114114
params.name = "Convolution-name";
115115
params.type = "Convolution";
116116

@@ -128,7 +128,7 @@ namespace cv {
128128
void setConvolution(int kernel, int pad, int stride,
129129
int filters_num, int channels_num, int use_batch_normalize, int use_relu)
130130
{
131-
cv::dnn::experimental_dnn_v1::LayerParams conv_param =
131+
cv::dnn::LayerParams conv_param =
132132
getParamConvolution(kernel, pad, stride, filters_num);
133133

134134
darknet::LayerParameter lp;
@@ -148,7 +148,7 @@ namespace cv {
148148

149149
if (use_batch_normalize)
150150
{
151-
cv::dnn::experimental_dnn_v1::LayerParams bn_param;
151+
cv::dnn::LayerParams bn_param;
152152

153153
bn_param.name = "BatchNorm-name";
154154
bn_param.type = "BatchNorm";
@@ -168,7 +168,7 @@ namespace cv {
168168

169169
if (use_relu)
170170
{
171-
cv::dnn::experimental_dnn_v1::LayerParams activation_param;
171+
cv::dnn::LayerParams activation_param;
172172
activation_param.set<float>("negative_slope", 0.1f);
173173
activation_param.name = "ReLU-name";
174174
activation_param.type = "ReLU";
@@ -189,7 +189,7 @@ namespace cv {
189189

190190
void setMaxpool(size_t kernel, size_t pad, size_t stride)
191191
{
192-
cv::dnn::experimental_dnn_v1::LayerParams maxpool_param;
192+
cv::dnn::LayerParams maxpool_param;
193193
maxpool_param.set<cv::String>("pool", "max");
194194
maxpool_param.set<int>("kernel_size", kernel);
195195
maxpool_param.set<int>("pad", pad);
@@ -212,7 +212,7 @@ namespace cv {
212212

213213
void setConcat(int number_of_inputs, int *input_indexes)
214214
{
215-
cv::dnn::experimental_dnn_v1::LayerParams concat_param;
215+
cv::dnn::LayerParams concat_param;
216216
concat_param.name = "Concat-name";
217217
concat_param.type = "Concat";
218218
concat_param.set<int>("axis", 1); // channels are in axis = 1
@@ -235,7 +235,7 @@ namespace cv {
235235

236236
void setIdentity(int bottom_index)
237237
{
238-
cv::dnn::experimental_dnn_v1::LayerParams identity_param;
238+
cv::dnn::LayerParams identity_param;
239239
identity_param.name = "Identity-name";
240240
identity_param.type = "Identity";
241241

@@ -256,7 +256,7 @@ namespace cv {
256256

257257
void setReorg(int stride)
258258
{
259-
cv::dnn::experimental_dnn_v1::LayerParams reorg_params;
259+
cv::dnn::LayerParams reorg_params;
260260
reorg_params.name = "Reorg-name";
261261
reorg_params.type = "Reorg";
262262
reorg_params.set<int>("reorg_stride", stride);
@@ -277,7 +277,7 @@ namespace cv {
277277

278278
void setPermute()
279279
{
280-
cv::dnn::experimental_dnn_v1::LayerParams permute_params;
280+
cv::dnn::LayerParams permute_params;
281281
permute_params.name = "Permute-name";
282282
permute_params.type = "Permute";
283283
int permute[] = { 0, 2, 3, 1 };
@@ -300,7 +300,7 @@ namespace cv {
300300

301301
void setRegion(float thresh, int coords, int classes, int anchors, int classfix, int softmax, int softmax_tree, float *biasData)
302302
{
303-
cv::dnn::experimental_dnn_v1::LayerParams region_param;
303+
cv::dnn::LayerParams region_param;
304304
region_param.name = "Region-name";
305305
region_param.type = "Region";
306306

modules/dnn/src/darknet/darknet_io.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ namespace cv {
7878
class LayerParameter {
7979
std::string layer_name, layer_type;
8080
std::vector<std::string> bottom_indexes;
81-
cv::dnn::experimental_dnn_v1::LayerParams layerParams;
81+
cv::dnn::LayerParams layerParams;
8282
public:
8383
friend class setLayersParams;
84-
cv::dnn::experimental_dnn_v1::LayerParams getLayerParams() const { return layerParams; }
84+
cv::dnn::LayerParams getLayerParams() const { return layerParams; }
8585
std::string name() const { return layer_name; }
8686
std::string type() const { return layer_type; }
8787
int bottom_size() const { return bottom_indexes.size(); }

0 commit comments

Comments
 (0)