瀏覽代碼

Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleX into develop

jiangjiajun 5 年之前
父節點
當前提交
4ff94e4721
共有 4 個文件被更改,包括 7 次插入6 次删除
  1. 4 4
      deploy/openvino/python/deploy.py
  2. 1 1
      deploy/openvino/src/paddlex.cpp
  3. 1 0
      docs/index.rst
  4. 1 1
      paddlex/converter.py

+ 4 - 4
deploy/openvino/python/deploy.py

@@ -173,9 +173,9 @@ class Predictor:
         score_name = next(it)
         score_map = np.squeeze(preds[score_name])
         score_map = np.transpose(score_map, (1, 2, 0))
-        
+
         im_info = preprocessed_inputs['im_info']
-        
+
         for info in im_info[0][::-1]:
             if info[0] == 'resize':
                 w, h = info[1][1], info[1][0]
@@ -192,8 +192,8 @@ class Predictor:
         """
         outputs = self.net.outputs
         for name in outputs:
-            if (len(outputs[name].shape) == 3):
-                output = preds[name][0]
+            if (len(outputs[name].shape) == 2):
+                output = preds[name]
         result = []
         for out in output:
             if (out[0] >= 0):

+ 1 - 1
deploy/openvino/src/paddlex.cpp

@@ -164,7 +164,7 @@ bool Model::predict(const cv::Mat& im, DetResult* result) {
   InferenceEngine::OutputsDataMap out_maps = network_.getOutputsInfo();
   std::string outputName;
   for (const auto & output_map : out_maps) {
-    if (output_map.second->getTensorDesc().getDims().size() == 3) {
+    if (output_map.second->getTensorDesc().getDims().size() == 2) {
       outputName = output_map.first;
     }
   }

+ 1 - 0
docs/index.rst

@@ -82,3 +82,4 @@ PaddleX是基于飞桨核心框架、开发套件和工具组件的深度学习
    appendix/metrics.md
    appendix/interpret.md
    appendix/how_to_offline_run.md
+   change_log.md

+ 1 - 1
paddlex/converter.py

@@ -33,7 +33,7 @@ class MultiClassNMS4OpenVINO():
         background = node.attr('background_label')
         normalized = node.attr('normalized')
         if normalized == False:
-            logging.warn(
+            logging.warning(
                         "The parameter normalized of multiclass_nms OP of Paddle is False, which has diff with ONNX." \
                         " Please set normalized=True in multiclass_nms of Paddle, see doc Q1 in" \
                         " https://github.com/PaddlePaddle/paddle2onnx/blob/develop/FAQ.md")