From ab8d8aeab8bbe36e0a100e034342646a7aa8f414 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Wed, 12 Aug 2020 12:56:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=80=E6=9C=89=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B7=AF=E5=BE=84=E4=B8=BA=E7=BB=9D=E5=AF=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E9=81=BF=E5=85=8D=E5=9C=A8=E5=90=8C=E7=BA=A7?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8B=E6=97=B6=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ppocr/postprocess/east_postprocess.py | 4 ++-- ppocr/postprocess/lanms/.ycm_extra_conf.py | 2 +- tools/eval.py | 4 ++-- tools/export_model.py | 4 ++-- tools/infer/predict_det.py | 4 ++-- tools/infer_det.py | 4 ++-- tools/infer_rec.py | 4 ++-- tools/train.py | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ppocr/postprocess/east_postprocess.py b/ppocr/postprocess/east_postprocess.py index 8200df3c..270cf669 100755 --- a/ppocr/postprocess/east_postprocess.py +++ b/ppocr/postprocess/east_postprocess.py @@ -22,9 +22,9 @@ import cv2 import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) class EASTPostPocess(object): diff --git a/ppocr/postprocess/lanms/.ycm_extra_conf.py b/ppocr/postprocess/lanms/.ycm_extra_conf.py index 3c8673dd..da0a97d4 100644 --- a/ppocr/postprocess/lanms/.ycm_extra_conf.py +++ b/ppocr/postprocess/lanms/.ycm_extra_conf.py @@ -25,7 +25,7 @@ import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. -sys.path.append(os.path.dirname(__file__)) +sys.path.append(os.path.abspath(os.path.dirname(__file__))) BASE_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tools/eval.py b/tools/eval.py index edd84a9d..22185911 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -18,9 +18,9 @@ from __future__ import print_function import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) def set_paddle_flags(**kwargs): diff --git a/tools/export_model.py b/tools/export_model.py index de4ba0e4..0bd06b98 100644 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -18,9 +18,9 @@ from __future__ import print_function import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) def set_paddle_flags(**kwargs): diff --git a/tools/infer/predict_det.py b/tools/infer/predict_det.py index 75644aeb..9334cf64 100755 --- a/tools/infer/predict_det.py +++ b/tools/infer/predict_det.py @@ -13,9 +13,9 @@ # limitations under the License. import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '../..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '../..'))) import tools.infer.utility as utility from ppocr.utils.utility import initial_logger diff --git a/tools/infer_det.py b/tools/infer_det.py index a8b49b6b..3e9c86c2 100755 --- a/tools/infer_det.py +++ b/tools/infer_det.py @@ -22,9 +22,9 @@ import json import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) def set_paddle_flags(**kwargs): diff --git a/tools/infer_rec.py b/tools/infer_rec.py index 8cde44d8..515d6a5d 100755 --- a/tools/infer_rec.py +++ b/tools/infer_rec.py @@ -19,9 +19,9 @@ from __future__ import print_function import numpy as np import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) def set_paddle_flags(**kwargs): diff --git a/tools/train.py b/tools/train.py index 68e792b7..d0d02bd4 100755 --- a/tools/train.py +++ b/tools/train.py @@ -18,9 +18,9 @@ from __future__ import print_function import os import sys -__dir__ = os.path.dirname(__file__) +__dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(__dir__) -sys.path.append(os.path.join(__dir__, '..')) +sys.path.append(os.path.abspath(os.path.join(__dir__, '..'))) def set_paddle_flags(**kwargs): -- GitLab