Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
39a68897
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 搜索 >>
提交
39a68897
编写于
7月 25, 2019
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15118 from dkurt:fix_15106
上级
0db4fb18
a2125594
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1817 addition
and
4 deletion
+1817
-4
modules/dnn/test/test_caffe_importer.cpp
modules/dnn/test/test_caffe_importer.cpp
+24
-1
samples/dnn/face_detector/deploy.prototxt
samples/dnn/face_detector/deploy.prototxt
+2
-2
samples/dnn/face_detector/deploy_lowres.prototxt
samples/dnn/face_detector/deploy_lowres.prototxt
+1790
-0
samples/dnn/js_face_recognition.html
samples/dnn/js_face_recognition.html
+1
-1
未找到文件。
modules/dnn/test/test_caffe_importer.cpp
浏览文件 @
39a68897
...
...
@@ -561,7 +561,7 @@ TEST(Test_Caffe, shared_weights)
typedef
testing
::
TestWithParam
<
tuple
<
std
::
string
,
Target
>
>
opencv_face_detector
;
TEST_P
(
opencv_face_detector
,
Accuracy
)
{
std
::
string
proto
=
findDataFile
(
"dnn/opencv_face_detector.prototxt"
,
false
);
std
::
string
proto
=
findDataFile
(
"dnn/opencv_face_detector.prototxt"
);
std
::
string
model
=
findDataFile
(
get
<
0
>
(
GetParam
()),
false
);
dnn
::
Target
targetId
=
(
dnn
::
Target
)(
int
)
get
<
1
>
(
GetParam
());
...
...
@@ -584,6 +584,29 @@ TEST_P(opencv_face_detector, Accuracy)
0
,
1
,
0.95097077
,
0.51901293
,
0.45863652
,
0.5777427
,
0.5347801
);
normAssertDetections
(
ref
,
out
,
""
,
0.5
,
1e-5
,
2e-4
);
}
// False positives bug for large faces: https://github.com/opencv/opencv/issues/15106
TEST_P
(
opencv_face_detector
,
issue_15106
)
{
std
::
string
proto
=
findDataFile
(
"dnn/opencv_face_detector.prototxt"
);
std
::
string
model
=
findDataFile
(
get
<
0
>
(
GetParam
()),
false
);
dnn
::
Target
targetId
=
(
dnn
::
Target
)(
int
)
get
<
1
>
(
GetParam
());
Net
net
=
readNetFromCaffe
(
proto
,
model
);
Mat
img
=
imread
(
findDataFile
(
"cv/shared/lena.png"
));
img
=
img
.
rowRange
(
img
.
rows
/
4
,
3
*
img
.
rows
/
4
).
colRange
(
img
.
cols
/
4
,
3
*
img
.
cols
/
4
);
Mat
blob
=
blobFromImage
(
img
,
1.0
,
Size
(
300
,
300
),
Scalar
(
104.0
,
177.0
,
123.0
),
false
,
false
);
net
.
setPreferableBackend
(
DNN_BACKEND_OPENCV
);
net
.
setPreferableTarget
(
targetId
);
net
.
setInput
(
blob
);
// Output has shape 1x1xNx7 where N - number of detections.
// An every detection is a vector of values [id, classId, confidence, left, top, right, bottom]
Mat
out
=
net
.
forward
();
Mat
ref
=
(
Mat_
<
float
>
(
1
,
7
)
<<
0
,
1
,
0.9149431
,
0.30424616
,
0.26964942
,
0.88733053
,
0.99815309
);
normAssertDetections
(
ref
,
out
,
""
,
0.2
,
6e-5
,
1e-4
);
}
INSTANTIATE_TEST_CASE_P
(
Test_Caffe
,
opencv_face_detector
,
Combine
(
Values
(
"dnn/opencv_face_detector.caffemodel"
,
...
...
samples/dnn/face_detector/deploy.prototxt
浏览文件 @
39a68897
...
...
@@ -892,7 +892,7 @@ layer {
}
convolution_param {
num_output: 128
pad:
1
pad:
0
kernel_size: 3
stride: 1
weight_filler {
...
...
@@ -958,7 +958,7 @@ layer {
}
convolution_param {
num_output: 128
pad:
1
pad:
0
kernel_size: 3
stride: 1
weight_filler {
...
...
samples/dnn/face_detector/deploy_lowres.prototxt
0 → 100644
浏览文件 @
39a68897
此差异已折叠。
点击以展开。
samples/dnn/js_face_recognition.html
浏览文件 @
39a68897
...
...
@@ -69,7 +69,7 @@ function recognize(face) {
function
loadModels
(
callback
)
{
var
utils
=
new
Utils
(
''
);
var
proto
=
'
https://raw.githubusercontent.com/opencv/opencv/3.4/samples/dnn/face_detector/deploy.prototxt
'
;
var
proto
=
'
https://raw.githubusercontent.com/opencv/opencv/3.4/samples/dnn/face_detector/deploy
_lowres
.prototxt
'
;
var
weights
=
'
https://raw.githubusercontent.com/opencv/opencv_3rdparty/dnn_samples_face_detector_20180205_fp16/res10_300x300_ssd_iter_140000_fp16.caffemodel
'
;
var
recognModel
=
'
https://raw.githubusercontent.com/pyannote/pyannote-data/master/openface.nn4.small2.v1.t7
'
;
utils
.
createFileFromUrl
(
'
face_detector.prototxt
'
,
proto
,
()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录