Skip to content

Commit

Permalink
[Enhance] Log coco metric copypaste. (open-mmlab#9012)
Browse files Browse the repository at this point in the history
  • Loading branch information
RangiLyu authored and MambaWong committed Oct 21, 2022
1 parent d0ac920 commit 451d69c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mmdet/evaluation/metrics/coco_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ def compute_metrics(self, results: list) -> Dict[str, float]:
val = coco_eval.stats[coco_metric_names[metric_item]]
eval_results[key] = float(f'{round(val, 3)}')

ap = coco_eval.stats[:6]
logger.info(f'{metric}_mAP_copypaste: {ap[0]:.3f} '
f'{ap[1]:.3f} {ap[2]:.3f} {ap[3]:.3f} '
f'{ap[4]:.3f} {ap[5]:.3f}')

if tmp_dir is not None:
tmp_dir.cleanup()
return eval_results

0 comments on commit 451d69c

Please sign in to comment.