mmrotate
mmrotate copied to clipboard
[Feature] Add RotatedCocoMetric
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
From https://github.com/facebookresearch/detectron2/blob/main/detectron2/evaluation/rotated_coco_evaluation.py
Use case: cfg:
test_evaluator = dict(type='RotatedCocoMetric', metric='bbox')
result:
10/19 21:14:02 - mmengine - INFO - Converting ground truth to coco format...
loading annotations into memory...
Done (t=0.09s)
creating index...
index created!
10/19 21:14:02 - mmengine - INFO - Evaluating bbox...
Loading and preparing results...
DONE (t=0.49s)
creating index...
index created!
Running per image evaluation...
Evaluate annotation type *bbox*
DONE (t=3.21s).
Accumulating evaluation results...
DONE (t=0.15s).
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.635
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.948
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.757
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.202
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.516
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.665
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.705
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.705
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.705
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.400
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.624
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.731
10/19 21:14:06 - mmengine - INFO - Epoch(test) [453/453] r_coco/bbox_mAP: 0.6350 r_coco/bbox_mAP_50: 0.9480 r_coco/bbox_mAP_75: 0.7570 r_coco/bbox_mAP_s: 0.2020 r_coco/bbox_mAP_m: 0.5160 r_coco/bbox_mAP_l: 0.6650
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the back-compatibility of the downstream repos? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist
- Pre-commit or other linting tools are used to fix the potential lint issues.
- The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- The documentation has been modified accordingly, like docstring or example tutorials.