浏览代码

Merge pull request #969 from FlyingQianMM/develop_deploy

set bbox_mmap and segm_mmap to 0 when there is no detected bbox
FlyingQianMM 4 年之前
父节点
当前提交
f3b8497565
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      dygraph/paddlex/cv/models/utils/det_metrics/metrics.py

+ 2 - 0
dygraph/paddlex/cv/models/utils/det_metrics/metrics.py

@@ -210,6 +210,8 @@ class COCOMetric(Metric):
         pass
 
     def get(self):
+        if 'bbox' not in self.eval_stats:
+            return {'bbox_mmap': 0.}
         if 'mask' in self.eval_stats:
             return OrderedDict(
                 zip(['bbox_mmap', 'segm_mmap'],