Эх сурвалжийг харах

Merge pull request #969 from FlyingQianMM/develop_deploy

set bbox_mmap and segm_mmap to 0 when there is no detected bbox
FlyingQianMM 4 жил өмнө
parent
commit
f3b8497565

+ 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'],