diff --git a/modules/dnn/test/cityscapes_semsegm_test_enet.py b/modules/dnn/test/cityscapes_semsegm_test_enet.py index e7e09d4ca4c8bd3f99c044eb081ee62b52d2cd64..5f0b4ba62517a5d3be7019b5be6e7cd7b1e62b6c 100644 --- a/modules/dnn/test/cityscapes_semsegm_test_enet.py +++ b/modules/dnn/test/cityscapes_semsegm_test_enet.py @@ -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: diff --git a/modules/dnn/test/imagenet_cls_test_alexnet.py b/modules/dnn/test/imagenet_cls_test_alexnet.py index de652040af24bf4329fbdc547550421a2e408b89..c136208d879ceca7b638b524d42949c64b1136e3 100644 --- a/modules/dnn/test/imagenet_cls_test_alexnet.py +++ b/modules/dnn/test/imagenet_cls_test_alexnet.py @@ -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): diff --git a/modules/dnn/test/imagenet_cls_test_googlenet.py b/modules/dnn/test/imagenet_cls_test_googlenet.py index 210b740ff9aa6d001cfc712a809bb4eefdb17530..6c7305b022910df54c4f06d64e16a72e4166e4e5 100644 --- a/modules/dnn/test/imagenet_cls_test_googlenet.py +++ b/modules/dnn/test/imagenet_cls_test_googlenet.py @@ -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() diff --git a/modules/dnn/test/imagenet_cls_test_inception.py b/modules/dnn/test/imagenet_cls_test_inception.py index dc4b1ac8466215d25c1343532813939806c1c36d..d6f0c55209ad65dff4d8adf949bbd0c52cbb9a53 100644 --- a/modules/dnn/test/imagenet_cls_test_inception.py +++ b/modules/dnn/test/imagenet_cls_test_inception.py @@ -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: diff --git a/modules/dnn/test/pascal_semsegm_test_fcn.py b/modules/dnn/test/pascal_semsegm_test_fcn.py index f7d9cd9dd3886989c594f91e5aac10e60ecf87ec..60b061ca37da68020d77b60f0e0be4fa3aee4ebd 100644 --- a/modules/dnn/test/pascal_semsegm_test_fcn.py +++ b/modules/dnn/test/pascal_semsegm_test_fcn.py @@ -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):