mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
dnn: updated YOLOv4-tiny model and tests
This commit is contained in:
@@ -1320,19 +1320,19 @@ TEST_P(Test_Int8_nets, YOLOv4_tiny)
|
||||
const int N0 = 2;
|
||||
const int N1 = 3;
|
||||
static const float ref_[/* (N0 + N1) * 7 */] = {
|
||||
0, 7, 0.85935f, 0.593484f, 0.141211f, 0.920356f, 0.291593f,
|
||||
0, 16, 0.795188f, 0.169207f, 0.386886f, 0.423753f, 0.933004f,
|
||||
0, 16, 0.912199f, 0.169926f, 0.350896f, 0.422704f, 0.941837f,
|
||||
0, 7, 0.845388f, 0.617568f, 0.13961f, 0.9008f, 0.29315f,
|
||||
|
||||
1, 2, 0.996832f, 0.653802f, 0.464573f, 0.815193f, 0.653292f,
|
||||
1, 2, 0.963325f, 0.451151f, 0.458915f, 0.496255f, 0.52241f,
|
||||
1, 0, 0.926244f, 0.194851f, 0.361743f, 0.260277f, 0.632364f,
|
||||
1, 2, 0.997789f, 0.657455f, 0.459714f, 0.809122f, 0.656829f,
|
||||
1, 2, 0.924423f, 0.442872f, 0.470127f, 0.49816f, 0.516516f,
|
||||
1, 0, 0.728307f, 0.202607f, 0.369828f, 0.259445f, 0.613846f,
|
||||
};
|
||||
Mat ref(N0 + N1, 7, CV_32FC1, (void*)ref_);
|
||||
|
||||
std::string config_file = "yolov4-tiny.cfg";
|
||||
std::string weights_file = "yolov4-tiny.weights";
|
||||
std::string config_file = "yolov4-tiny-2020-12.cfg";
|
||||
std::string weights_file = "yolov4-tiny-2020-12.weights";
|
||||
double scoreDiff = 0.12;
|
||||
double iouDiff = target == DNN_TARGET_OPENCL_FP16 ? 0.2 : 0.082;
|
||||
double iouDiff = target == DNN_TARGET_OPENCL_FP16 ? 0.2 : 0.118;
|
||||
|
||||
{
|
||||
SCOPED_TRACE("batch size 1");
|
||||
@@ -1340,7 +1340,7 @@ TEST_P(Test_Int8_nets, YOLOv4_tiny)
|
||||
|
||||
{
|
||||
SCOPED_TRACE("Per-tensor quantize");
|
||||
testDarknetModel(config_file, weights_file, ref.rowRange(0, N0), scoreDiff, 0.16, 0.7, 0.4, false);
|
||||
testDarknetModel(config_file, weights_file, ref.rowRange(0, N0), scoreDiff, 0.224, 0.7, 0.4, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user