open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.02k stars 9.36k forks source link

How can I get the mAP of each classes in mmdetection3.1.0? #11243

Open da-orange-zi opened 9 months ago

1Iris commented 8 months ago

my version is 3.2.0,I have faced this problem,I forget which filepath(may the path:mmdet/evalution ),just set the "classwise = True"can solve it.by the way, my datasets is cocodatasets

1Iris commented 8 months ago

I found it:mmdetection/mmdet/evaluation/metrics/coco_metric.py,line 73:

ann_file: Optional[str] = None, metric: Union[str, List[str]] = 'bbox',

**classwise: bool = False,

             classwise: bool = True,**
             proposal_nums: Sequence[int] = (100, 300, 1000),