提交 af16e0cd 编写于 作者: R root 提交者: Tingquan Gao

fix: rm sys.path.append in main python file

上级 2478dad1
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, '../')))
import cv2 import cv2
import faiss import faiss
...@@ -23,10 +19,10 @@ import numpy as np ...@@ -23,10 +19,10 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
import pickle import pickle
from python.predict_rec import RecPredictor from paddleclas.deploy.utils import logger, config
from paddleclas.deploy.utils.predictor import Predictor
from utils import logger from paddleclas.deploy.python.predict_rec import RecPredictor
from utils import config from paddleclas.deploy.python.predict_rec import RecPredictor
def split_datafile(data_file, image_root, delimiter="\t"): def split_datafile(data_file, image_root, delimiter="\t"):
......
...@@ -11,29 +11,23 @@ ...@@ -11,29 +11,23 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, '../')))
from utils import logger
from utils import config
from utils.predictor import Predictor
from utils.get_image_list import get_image_list
from det_preprocess import det_preprocess
from preprocess import create_operators
import os import os
import argparse import argparse
import time import time
from functools import reduce
import yaml import yaml
import ast import ast
from functools import reduce
import cv2
import numpy as np import numpy as np
import cv2
import paddle import paddle
from paddleclas.deploy.utils import logger, config
from paddleclas.deploy.utils.predictor import Predictor
from paddleclas.deploy.utils.get_image_list import get_image_list
from paddleclas.deploy.python.preprocess import create_operators
from paddleclas.deploy.python.det_preprocess import det_preprocess
class DetPredictor(Predictor): class DetPredictor(Predictor):
def __init__(self, config): def __init__(self, config):
......
...@@ -12,20 +12,15 @@ ...@@ -12,20 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, '../')))
import cv2 import cv2
import numpy as np import numpy as np
from utils import logger from paddleclas.deploy.utils import logger, config
from utils import config from paddleclas.deploy.utils.predictor import Predictor
from utils.predictor import Predictor from paddleclas.deploy.utils.get_image_list import get_image_list
from utils.get_image_list import get_image_list from paddleclas.deploy.python.preprocess import create_operators
from preprocess import create_operators from paddleclas.deploy.python.postprocess import build_postprocess
from postprocess import build_postprocess
class RecPredictor(Predictor): class RecPredictor(Predictor):
......
...@@ -12,24 +12,18 @@ ...@@ -12,24 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, '../')))
import copy import copy
import cv2
import numpy as np import numpy as np
import cv2
import faiss import faiss
import pickle import pickle
from python.predict_rec import RecPredictor from paddleclas.deploy.utils import logger, config
from python.predict_det import DetPredictor from paddleclas.deploy.utils.get_image_list import get_image_list
from paddleclas.deploy.utils.draw_bbox import draw_bbox_results
from utils import logger from paddleclas.deploy.python.predict_rec import RecPredictor
from utils import config from paddleclas.deploy.python.predict_det import DetPredictor
from utils.get_image_list import get_image_list
from utils.draw_bbox import draw_bbox_results
class SystemPredictor(object): class SystemPredictor(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册