需要改动mmdetection/mmdet/datasets/coco.py中的一行代码
# 307行
def evaluate(self,
results,
metric='bbox',
logger=None,
jsonfile_prefix=None,
# 是否显示每个类别
classwise=True,
官方代码已经写上了显示每类ap,只需要把classwise=False改成True就可以。
如果代码里没有这一行,可能是mmdection版本较低,建议升级。