在使用mmdetection时,测试voc数据集无法得到精度指标,只有recall和mAP,这里可以通过修改几行代码来获得precision指标
修改后打印结果:
代码修改
修改mmdet/core/evaluation/mean_ap.py文件里的print_map_summary函数的5处代码,你可以直接复制这个函数,然后替换掉原来的函数。修改后的函数为:
def print_map_summary(mean_ap,
results,
dataset=None,
scale_ranges=None,
logger=None):
"""Print mAP and results of each class.
A table will be printed to show the gts/dets/recall/AP of each class and
the mAP.
Args:
mean_ap (float): Calculated from `eval_map()`.
results (list[dict]): Calculated from `eval_map()`.
dataset (list[str] | str | None): Dataset name or dataset classes.
scale_ranges (list[tuple] | None):