1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Support for several min and max sizes in PriorBox layer (Merge pull request #15076)

* Support for several min and max sizes in PriorBox layer

* Fix minSize

* Check size

* Modify initInfEngine

* Fix tests

* Fix IE support

* Add priorbox test

* Remove inputs
This commit is contained in:
Lubov Batanina
2019-07-30 17:23:47 +03:00
committed by Maksim Shabunin
parent e90438fe3c
commit 5a6b23e8f3
5 changed files with 259 additions and 212 deletions
+16
View File
@@ -742,6 +742,22 @@ TEST_P(Test_Caffe_layers, Average_pooling_kernel_area)
normAssert(out, blobFromImage(ref));
}
TEST_P(Test_Caffe_layers, PriorBox_repeated)
{
Net net = readNet(_tf("prior_box.prototxt"));
int inp_size[] = {1, 3, 10, 10};
int shape_size[] = {1, 2, 3, 4};
Mat inp(4, inp_size, CV_32F);
randu(inp, -1.0f, 1.0f);
Mat shape(4, shape_size, CV_32F);
randu(shape, -1.0f, 1.0f);
net.setInput(inp, "data");
net.setInput(shape, "shape");
Mat out = net.forward();
Mat ref = blobFromNPY(_tf("priorbox_output.npy"));
normAssert(out, ref, "");
}
// Test PriorBoxLayer in case of no aspect ratios (just squared proposals).
TEST_P(Test_Caffe_layers, PriorBox_squares)
{