Преглед изворни кода

Merge pull request #1253 from FlyingQianMM/develop_qh

fix the bugs in im_shape and scale_factor setting in c++ deployments
FlyingQianMM пре 4 година
родитељ
комит
f6cb5b4d15

+ 2 - 1
deploy/cpp/model_deploy/ppdet/src/det_preprocess.cpp

@@ -82,7 +82,8 @@ bool DetPreprocess::PrepareInputsForV2(
       }
       resize_w = static_cast<float>(shape_infos[i].shapes[j][0]);
       resize_h = static_cast<float>(shape_infos[i].shapes[j][1]);
-      break;
+      if (shape_infos[i].transforms[j].rfind("Resize", 0) == 0)
+        break;
     }
     float scale_x = resize_w / origin_w;
     float scale_y = resize_h / origin_h;

+ 1 - 1
paddlex/cv/models/utils/det_metrics/coco_utils.py

@@ -279,7 +279,7 @@ def analyze_individual_category(k, cocoDt, cocoGt, catId, iou_type,
                                 areas=None):
     """针对某个特定类别,分析忽略亚类混淆和类别混淆时的准确率。
 
-       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/coco_error_analysis.py
+       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/analysis_tools/coco_error_analysis.py#L174
 
        Args:
            k (int): 待分析类别的序号。

+ 2 - 2
static/paddlex/cv/models/utils/detection_eval.py

@@ -862,7 +862,7 @@ def makeplot(rs, ps, outDir, class_name, iou_type):
 def analyze_individual_category(k, cocoDt, cocoGt, catId, iou_type):
     """针对某个特定类别,分析忽略亚类混淆和类别混淆时的准确率。
 
-       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/coco_error_analysis.py
+       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/analysis_tools/coco_error_analysis.py#L174
 
        Args:
            k (int): 待分析类别的序号。
@@ -945,7 +945,7 @@ def coco_error_analysis(eval_details_file=None,
     """逐个分析模型预测错误的原因,并将分析结果以图表的形式展示。
        分析结果说明参考COCODataset官网给出分析工具说明https://cocodataset.org/#detection-eval。
 
-       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/coco_error_analysis.py
+       Refer to https://github.com/open-mmlab/mmdetection/blob/master/tools/analysis_tools/coco_error_analysis.py
 
        Args:
            eval_details_file (str):  模型评估结果的保存路径,包含真值信息和预测结果。