Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
seo young Joung
opencv
Commits
ee54bafe
Commit
ee54bafe
authored
8 years ago
by
Alexander Alekhin
Browse files
Options
Download
Email Patches
Plain Diff
dnn: fix dnn python test files
parent
e03569f3
4.x
3.4
5.x
master
next
4.5.5
4.5.4
4.5.3
4.5.3-openvino
4.5.3-openvino-2021.4.2
4.5.3-openvino-2021.4.1
4.5.2
4.5.2-openvino
4.5.1
4.5.1-openvino
4.5.0
4.5.0-openvino
4.4.0
4.4.0-openvino
4.3.0
4.3.0-openvino
4.3.0-openvino-2020.3.0
4.2.0
4.2.0-openvino
4.1.2
4.1.2-openvino
4.1.1
4.1.1-openvino
4.1.0
4.1.0-openvino
4.0.1
4.0.1-openvino
4.0.0
4.0.0-rc
4.0.0-openvino
4.0.0-beta
4.0.0-alpha
3.4.17
3.4.16
3.4.15
3.4.14
3.4.13
3.4.12
3.4.11
3.4.10
3.4.9
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.3-openvino
3.4.2
3.4.2-openvino
3.4.1
3.4.1-cvsdk
3.4.0
3.4.0-rc
3.3.1
3.3.1-cvsdk
3.3.0
3.3.0-rc
3.3.0-cvsdk
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
modules/dnn/test/cityscapes_semsegm_test_enet.py
+2
-4
modules/dnn/test/cityscapes_semsegm_test_enet.py
modules/dnn/test/imagenet_cls_test_alexnet.py
+4
-8
modules/dnn/test/imagenet_cls_test_alexnet.py
modules/dnn/test/imagenet_cls_test_googlenet.py
+4
-8
modules/dnn/test/imagenet_cls_test_googlenet.py
modules/dnn/test/imagenet_cls_test_inception.py
+2
-4
modules/dnn/test/imagenet_cls_test_inception.py
modules/dnn/test/pascal_semsegm_test_fcn.py
+2
-3
modules/dnn/test/pascal_semsegm_test_fcn.py
with
14 additions
and
27 deletions
+14
-27
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
o
pen
cv
. 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
O
pen
CV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH
to
"
opencv_build_dir/lib
"
dir
ectory (with "python3" subdirectory if required)
'
)
try
:
import
torch
except
ImportError
:
...
...
This diff is collapsed.
Click to expand it.
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
o
pen
cv
. 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
O
pen
CV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH
to
"
opencv_build_dir/lib
"
dir
ectory (with "python3" subdirectory if required)
'
)
class
DataFetch
(
object
):
...
...
This diff is collapsed.
Click to expand it.
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
o
pen
cv
. 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
O
pen
CV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH
to
"
opencv_build_dir/lib
"
dir
ectory (with "python3" subdirectory if required)
'
)
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
...
...
This diff is collapsed.
Click to expand it.
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
o
pen
cv
. 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
O
pen
CV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH
to
"
opencv_build_dir/lib
"
dir
ectory (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:
...
...
This diff is collapsed.
Click to expand it.
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
o
pen
cv
. 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
O
pen
CV Python module
. If you
\'
ve built it from sources without installation, '
'
configure environemnt variable PYTHONPATH
to
"
opencv_build_dir/lib
"
dir
ectory (with "python3" subdirectory if required)
'
)
def
get_metrics
(
conf_mat
):
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help