Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
ee54bafe
Commit
ee54bafe
authored
Jun 26, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnn: fix dnn python test files
parent
e03569f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
27 deletions
+14
-27
cityscapes_semsegm_test_enet.py
modules/dnn/test/cityscapes_semsegm_test_enet.py
+2
-4
imagenet_cls_test_alexnet.py
modules/dnn/test/imagenet_cls_test_alexnet.py
+4
-8
imagenet_cls_test_googlenet.py
modules/dnn/test/imagenet_cls_test_googlenet.py
+4
-8
imagenet_cls_test_inception.py
modules/dnn/test/imagenet_cls_test_inception.py
+2
-4
pascal_semsegm_test_fcn.py
modules/dnn/test/pascal_semsegm_test_fcn.py
+2
-3
No files found.
modules/dnn/test/cityscapes_semsegm_test_enet.py
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment