Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
1f41d06f
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1f41d06f
编写于
12月 23, 2022
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #23008 from mshabunin:fix-yolov4-tiny-hash
上级
734fb18c
d35fbe6b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
22 deletion
+23
-22
modules/dnn/perf/perf_net.cpp
modules/dnn/perf/perf_net.cpp
+1
-1
modules/dnn/test/test_darknet_importer.cpp
modules/dnn/test/test_darknet_importer.cpp
+13
-12
modules/dnn/test/test_int8_layers.cpp
modules/dnn/test/test_int8_layers.cpp
+9
-9
未找到文件。
modules/dnn/perf/perf_net.cpp
浏览文件 @
1f41d06f
...
...
@@ -251,7 +251,7 @@ PERF_TEST_P_(DNNTestNetwork, YOLOv4_tiny)
cvtColor
(
sample
,
sample
,
COLOR_BGR2RGB
);
Mat
inp
;
sample
.
convertTo
(
inp
,
CV_32FC3
,
1.0
f
/
255
,
0
);
processNet
(
"dnn/yolov4-tiny
.weights"
,
"dnn/yolov4-tiny
.cfg"
,
""
,
inp
);
processNet
(
"dnn/yolov4-tiny
-2020-12.weights"
,
"dnn/yolov4-tiny-2020-12
.cfg"
,
""
,
inp
);
}
PERF_TEST_P_
(
DNNTestNetwork
,
EAST_text_detection
)
...
...
modules/dnn/test/test_darknet_importer.cpp
浏览文件 @
1f41d06f
...
...
@@ -562,12 +562,12 @@ TEST_P(Test_Darknet_nets_async, Accuracy)
l1
=
0.001
;
lInf
=
0.005
;
}
if
(
INF_ENGINE_VER_MAJOR_EQ
(
2021040000
)
&&
targetId
==
DNN_TARGET_OPENCL_FP16
&&
prefix
==
"yolov4-tiny"
)
// FIXIT: 4.x only, 3.4 branch works well
if
(
INF_ENGINE_VER_MAJOR_EQ
(
2021040000
)
&&
targetId
==
DNN_TARGET_OPENCL_FP16
&&
prefix
==
"yolov4-tiny
-2020-12
"
)
// FIXIT: 4.x only, 3.4 branch works well
{
l1
=
0.001
;
lInf
=
0.005
;
}
if
(
INF_ENGINE_VER_MAJOR_EQ
(
2022010000
)
&&
targetId
==
DNN_TARGET_OPENCL_FP16
&&
prefix
==
"yolov4-tiny"
)
// FIXIT: 4.x only, 3.4 branch works well
if
(
INF_ENGINE_VER_MAJOR_EQ
(
2022010000
)
&&
targetId
==
DNN_TARGET_OPENCL_FP16
&&
prefix
==
"yolov4-tiny
-2020-12
"
)
// FIXIT: 4.x only, 3.4 branch works well
{
l1
=
0.001
;
lInf
=
0.005
;
...
...
@@ -594,7 +594,7 @@ TEST_P(Test_Darknet_nets_async, Accuracy)
}
INSTANTIATE_TEST_CASE_P
(
/**/
,
Test_Darknet_nets_async
,
Combine
(
Values
(
"yolo-voc"
,
"tiny-yolo-voc"
,
"yolov3"
,
"yolov4"
,
"yolov4-tiny"
),
Values
(
"yolo-voc"
,
"tiny-yolo-voc"
,
"yolov3"
,
"yolov4"
,
"yolov4-tiny
-2020-12
"
),
dnnBackendsAndTargets
()
));
...
...
@@ -827,25 +827,26 @@ TEST_P(Test_Darknet_nets, YOLOv4_tiny)
const
double
confThreshold
=
0.5
;
// batchId, classId, confidence, left, top, right, bottom
const
int
N0
=
2
;
const
int
N0
=
3
;
const
int
N1
=
3
;
static
const
float
ref_
[
/* (N0 + N1) * 7 */
]
=
{
0
,
7
,
0.85935
f
,
0.593484
f
,
0.141211
f
,
0.920356
f
,
0.291593
f
,
0
,
16
,
0.795188
f
,
0.169207
f
,
0.386886
f
,
0.423753
f
,
0.933004
f
,
0
,
16
,
0.889883
f
,
0.177204
f
,
0.356279
f
,
0.417204
f
,
0.937517
f
,
0
,
7
,
0.816615
f
,
0.604293
f
,
0.137345
f
,
0.918016
f
,
0.295708
f
,
0
,
1
,
0.595912
f
,
0.0940107
f
,
0.178122
f
,
0.750619
f
,
0.829336
f
,
1
,
2
,
0.99
6832
f
,
0.653802
f
,
0.464573
f
,
0.815193
f
,
0.653292
f
,
1
,
2
,
0.96
3325
f
,
0.451151
f
,
0.458915
f
,
0.496255
f
,
0.52241
f
,
1
,
0
,
0.
926244
f
,
0.194851
f
,
0.361743
f
,
0.260277
f
,
0.632364
f
,
1
,
2
,
0.99
8224
f
,
0.652883
f
,
0.463477
f
,
0.813952
f
,
0.657163
f
,
1
,
2
,
0.96
7396
f
,
0.4539
f
,
0.466368
f
,
0.497716
f
,
0.520299
f
,
1
,
0
,
0.
807866
f
,
0.205039
f
,
0.361842
f
,
0.260984
f
,
0.643621
f
,
};
Mat
ref
(
N0
+
N1
,
7
,
CV_32FC1
,
(
void
*
)
ref_
);
double
scoreDiff
=
0.01
f
;
double
scoreDiff
=
0.01
2
f
;
double
iouDiff
=
(
target
==
DNN_TARGET_OPENCL_FP16
||
target
==
DNN_TARGET_MYRIAD
)
?
0.15
:
0.01
f
;
if
(
target
==
DNN_TARGET_CUDA_FP16
)
iouDiff
=
0.02
;
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"
;
#if defined(INF_ENGINE_RELEASE)
if
(
target
==
DNN_TARGET_MYRIAD
)
// bad accuracy
...
...
modules/dnn/test/test_int8_layers.cpp
浏览文件 @
1f41d06f
...
...
@@ -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.85935
f
,
0.593484
f
,
0.141211
f
,
0.920356
f
,
0.291593
f
,
0
,
16
,
0.795188
f
,
0.169207
f
,
0.386886
f
,
0.423753
f
,
0.933004
f
,
0
,
16
,
0.912199
f
,
0.169926
f
,
0.350896
f
,
0.422704
f
,
0.941837
f
,
0
,
7
,
0.845388
f
,
0.617568
f
,
0.13961
f
,
0.9008
f
,
0.29315
f
,
1
,
2
,
0.99
6832
f
,
0.653802
f
,
0.464573
f
,
0.815193
f
,
0.653292
f
,
1
,
2
,
0.9
63325
f
,
0.451151
f
,
0.458915
f
,
0.496255
f
,
0.52241
f
,
1
,
0
,
0.
926244
f
,
0.194851
f
,
0.361743
f
,
0.260277
f
,
0.632364
f
,
1
,
2
,
0.99
7789
f
,
0.657455
f
,
0.459714
f
,
0.809122
f
,
0.656829
f
,
1
,
2
,
0.9
24423
f
,
0.442872
f
,
0.470127
f
,
0.49816
f
,
0.516516
f
,
1
,
0
,
0.
728307
f
,
0.202607
f
,
0.369828
f
,
0.259445
f
,
0.613846
f
,
};
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
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录