Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
自由之枫~
opencv
提交
ee54bafe
O
opencv
项目概览
自由之枫~
/
opencv
与 Fork 源项目一致
Fork自
OpenCV / opencv
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ee54bafe
编写于
6月 26, 2017
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dnn: fix dnn python test files
上级
e03569f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
27 deletion
+14
-27
modules/dnn/test/cityscapes_semsegm_test_enet.py
modules/dnn/test/cityscapes_semsegm_test_enet.py
+2
-4
modules/dnn/test/imagenet_cls_test_alexnet.py
modules/dnn/test/imagenet_cls_test_alexnet.py
+4
-8
modules/dnn/test/imagenet_cls_test_googlenet.py
modules/dnn/test/imagenet_cls_test_googlenet.py
+4
-8
modules/dnn/test/imagenet_cls_test_inception.py
modules/dnn/test/imagenet_cls_test_inception.py
+2
-4
modules/dnn/test/pascal_semsegm_test_fcn.py
modules/dnn/test/pascal_semsegm_test_fcn.py
+2
-3
未找到文件。
modules/dnn/test/cityscapes_semsegm_test_enet.py
浏览文件 @
ee54bafe
...
...
@@ -4,13 +4,11 @@ import os
import
fnmatch
import
argparse
# sys.path.append('<path to opencv_build_dir/lib>')
sys
.
path
.
append
(
'/home/arrybn/build/opencv_w_contrib/lib'
)
try
:
import
cv2
as
cv
except
ImportError
:
raise
ImportError
(
'Can
\'
t find
opencv
. If you
\'
ve built it from sources without installation, '
'
uncomment the line before and insert there path to opencv_build_dir/lib dir
'
)
raise
ImportError
(
'Can
\'
t find
OpenCV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH to "opencv_build_dir/lib" directory (with "python3" subdirectory if required)
'
)
try
:
import
torch
except
ImportError
:
...
...
modules/dnn/test/imagenet_cls_test_alexnet.py
浏览文件 @
ee54bafe
...
...
@@ -5,20 +5,16 @@ import os
import
argparse
import
time
# sys.path.append('<path to git/caffe/python dir>')
sys
.
path
.
append
(
'/home/arrybn/git/caffe/python'
)
try
:
import
caffe
except
ImportError
:
raise
ImportError
(
'Can
\'
t find caffe. If you
\'
ve built it from sources without installation, '
'uncomment the line before and insert there path to git/caffe/python dir'
)
# sys.path.append('<path to opencv_build_dir/lib>')
sys
.
path
.
append
(
'/home/arrybn/build/opencv_w_contrib/lib'
)
raise
ImportError
(
'Can
\'
t find Caffe Python module. If you
\'
ve built it from sources without installation, '
'configure environemnt variable PYTHONPATH to "git/caffe/python" directory'
)
try
:
import
cv2
as
cv
except
ImportError
:
raise
ImportError
(
'Can
\'
t find
opencv
. If you
\'
ve built it from sources without installation, '
'
uncomment the line before and insert there path to opencv_build_dir/lib dir
'
)
raise
ImportError
(
'Can
\'
t find
OpenCV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH to "opencv_build_dir/lib" directory (with "python3" subdirectory if required)
'
)
class
DataFetch
(
object
):
...
...
modules/dnn/test/imagenet_cls_test_googlenet.py
浏览文件 @
ee54bafe
...
...
@@ -3,20 +3,16 @@ import sys
import
os
import
argparse
from
imagenet_cls_test_alexnet
import
MeanChannelsFetch
,
CaffeModel
,
DnnCaffeModel
,
ClsAccEvaluation
# sys.path.append('<path to git/caffe/python dir>')
sys
.
path
.
append
(
'/home/arrybn/git/caffe/python'
)
try
:
import
caffe
except
ImportError
:
raise
ImportError
(
'Can
\'
t find caffe. If you
\'
ve built it from sources without installation, '
'uncomment the line before and insert there path to git/caffe/python dir'
)
# sys.path.append('<path to opencv_build_dir/lib>')
sys
.
path
.
append
(
'/home/arrybn/build/opencv_w_contrib/lib'
)
raise
ImportError
(
'Can
\'
t find Caffe Python module. If you
\'
ve built it from sources without installation, '
'configure environemnt variable PYTHONPATH to "git/caffe/python" directory'
)
try
:
import
cv2
as
cv
except
ImportError
:
raise
ImportError
(
'Can
\'
t find
opencv
. If you
\'
ve built it from sources without installation, '
'
uncomment the line before and insert there path to opencv_build_dir/lib dir
'
)
raise
ImportError
(
'Can
\'
t find
OpenCV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH to "opencv_build_dir/lib" directory (with "python3" subdirectory if required)
'
)
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
...
...
modules/dnn/test/imagenet_cls_test_inception.py
浏览文件 @
ee54bafe
...
...
@@ -5,13 +5,11 @@ import argparse
import
tensorflow
as
tf
from
tensorflow.python.platform
import
gfile
from
imagenet_cls_test_alexnet
import
MeanValueFetch
,
DnnCaffeModel
,
Framework
,
ClsAccEvaluation
# sys.path.append('<path to opencv_build_dir/lib>')
sys
.
path
.
append
(
'/home/arrybn/build/opencv_w_contrib/lib'
)
try
:
import
cv2
as
cv
except
ImportError
:
raise
ImportError
(
'Can
\'
t find
opencv
. If you
\'
ve built it from sources without installation, '
'
uncomment the line before and insert there path to opencv_build_dir/lib dir
'
)
raise
ImportError
(
'Can
\'
t find
OpenCV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH to "opencv_build_dir/lib" directory (with "python3" subdirectory if required)
'
)
# If you've got an exception "Cannot load libmkl_avx.so or libmkl_def.so" or similar, try to export next variable
# before runnigng the script:
...
...
modules/dnn/test/pascal_semsegm_test_fcn.py
浏览文件 @
ee54bafe
...
...
@@ -5,12 +5,11 @@ import argparse
import
time
from
imagenet_cls_test_alexnet
import
CaffeModel
,
DnnCaffeModel
sys
.
path
.
append
(
'/home/arrybn/build/opencv_w_contrib/lib'
)
try
:
import
cv2
as
cv
except
ImportError
:
raise
ImportError
(
'Can
\'
t find
opencv
. If you
\'
ve built it from sources without installation, '
'
uncomment the line before and insert there path to opencv_build_dir/lib dir
'
)
raise
ImportError
(
'Can
\'
t find
OpenCV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH to "opencv_build_dir/lib" directory (with "python3" subdirectory if required)
'
)
def
get_metrics
(
conf_mat
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录