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

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2020-03-10 22:44:14 +00:00
12 changed files with 247 additions and 89 deletions
+8 -2
View File
@@ -97,7 +97,7 @@ TEST(Test_Darknet, read_yolo_voc_stream)
class Test_Darknet_layers : public DNNTestLayer
{
public:
void testDarknetLayer(const std::string& name, bool hasWeights = false)
void testDarknetLayer(const std::string& name, bool hasWeights = false, bool testBatchProcessing = true)
{
SCOPED_TRACE(name);
Mat inp = blobFromNPY(findDataFile("dnn/darknet/" + name + "_in.npy"));
@@ -117,7 +117,7 @@ public:
Mat out = net.forward();
normAssert(out, ref, "", default_l1, default_lInf);
if (inp.size[0] == 1) // test handling of batch size
if (inp.size[0] == 1 && testBatchProcessing) // test handling of batch size
{
SCOPED_TRACE("batch size 2");
@@ -578,6 +578,12 @@ TEST_P(Test_Darknet_layers, convolutional)
testDarknetLayer("convolutional", true);
}
TEST_P(Test_Darknet_layers, scale_channels)
{
// TODO: test fails for batches due to a bug/missing feature in ScaleLayer
testDarknetLayer("scale_channels", false, false);
}
TEST_P(Test_Darknet_layers, connected)
{
if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)