Parcourir la source

Merge pull request #969 from FlyingQianMM/develop_deploy

set bbox_mmap and segm_mmap to 0 when there is no detected bbox
FlyingQianMM il y a 4 ans
Parent
commit
f3b8497565
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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'],