Browse Source

refine cpp seg deploy postprocess

will-jl944 4 years ago
parent
commit
05f6c194d0
2 changed files with 3 additions and 3 deletions
  1. 2 2
      paddlex/cv/models/segmenter.py
  2. 1 1
      paddlex/deploy.py

+ 2 - 2
paddlex/cv/models/segmenter.py

@@ -616,9 +616,9 @@ class BaseSegmenter(BaseModel):
                 if item[0] == 'resize':
                     if isinstance(label_map, np.ndarray):
                         label_map = cv2.resize(
-                            label_map, (h, w), interpolation=cv2.INTER_NEAREST)
+                            label_map, (w, h), interpolation=cv2.INTER_NEAREST)
                         score_map = cv2.resize(
-                            score_map, (h, w), interpolation=cv2.INTER_LINEAR)
+                            score_map, (w, h), interpolation=cv2.INTER_LINEAR)
                     else:
                         label_map = F.interpolate(
                             label_map, (h, w),

+ 1 - 1
paddlex/deploy.py

@@ -27,7 +27,7 @@ class Predictor(object):
                  use_gpu=False,
                  gpu_id=0,
                  cpu_thread_num=1,
-                 use_mkl=True,
+                 use_mkl=False,
                  mkl_thread_num=4,
                  use_trt=False,
                  use_glog=False,