Home

Awesome

One Metric to Measure them All: Localisation Recall Precision (LRP) for Evaluating Visual Detection Tasks

The official implementation of the "LRP Error", which was proposed in the following publications.

One Metric to Measure them All: Localisation Recall Precision (LRP) for Evaluating Visual Detection Tasks,
Kemal Oksuz, Baris Can Cam, Sinan Kalkan, Emre Akbas,
IEEE Transaction on Pattern Analysis and Machine Intelligence, 2021. (publisher's page)

Localization Recall Precision (LRP): A New Performance Metric for Object Detection.
Kemal Oksuz, Baris Can Cam, Emre Akbas, Sinan Kalkan,
European Conference on Computer Vision, 2020.

This repository provides the implementation of LRP Error on the following evaluation apis:

For mmdetection COCO api [4] to evaluate object detection, keypoint detection and instance segmentation see this repository.

How to Cite

Please cite the following papers if you find our papers or repository useful. If you must cite only 1 paper, please prefer the TPAMI one.

@article{LRP_TPAMI, 
  title={One metric to measure them all: Localisation recall precision (LRP) for evaluating visual detection tasks}, 
  author={Oksuz, Kemal and Cam, Baris Can and Kalkan, Sinan and Akbas, Emre}, 
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  year={2021}, 
  publisher={IEEE}
}

@inproceedings{LRP_ECCV, 
  title={Localization recall precision (LRP): A new performance metric for object detection}, 
  author={Oksuz, Kemal and Cam, Baris Can and Akbas, Emre and Kalkan, Sinan}, 
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)}, 
  pages={504--519}, 
  year={2018}
}

Contribution to the Repository

Any contribution to the repository is appreciated. In addition to the datasets and tasks we provide, if you implement LRP Error to evaluate the results of different datasets or different tasks, please follow the subdirectory-based structure of the repository and then make a pull request. Feel free to contact for any question.

Summary

In a nutshell, LRP Error (previously proposed only for object detection in [5])

A Brief Overview of the Paper

In our paper, we first define three important features for a performance measure to evaluate visual object detection tasks; then analyse AP, PQ and LRP based on these features. Finally, again based on these important features, we empirically demonstrate the drawbacks of AP and PQ, and discuss how LRP alleviates their drawbacks.

Important features for a performance measure

We identify three important features for a performance measure to evaluate visual object detection tasks as follows:

Intuition of LRP and Optimal LRP

LRP Error is defined as the ''average matching error'', where the ''total matching error'' between ground truth set and detection set is normalised by the ''maximum possible value of the total matching error'':

LRP can directly be used to evaluate panoptic segmentation since the conventional output of panoptic segmentation does not contain confidence scores. As for the outputs with confidence scores (e.g. the outputs of object detection, keypoint detection and instance segmentation), we define Optimal LRP (oLRP) as the minimum achievable LRP Error over the confidence scores. Accordingly, oLRP identifies the optimal configuration and the confidence score corresponding to oLRP is the ''LRP-Optimal Threshold''.

Therefore, LRP replaces PQ and oLRP replaces AP.

Comparison of LRP with AP and PQ

Comparison of oLRP with AP

LRP Toy Example

Please see our paper for a more comprehensive analysis of AP (including COCO-style AP), and its theoretical and empirical comparisons with LRP.

Comparison of LRP with PQ

Please see our paper for a more comprehensive analysis of PQ, and its theoretical and empirical comparisons with LRP.

Specification of Dependencies

Installation

In this repo, we merge using LRP on different tasks and datasets into one repo. Currently, you could install by run

# Install cocoapi
pip install "git+https://github.com/kemaloksuz/LRP-Error.git#subdirectory=pycocotools"
# Install panopticapi
pip install "git+https://github.com/kemaloksuz/LRP-Error.git#subdirectory=panopticapi"
# Install lvisapi (requires cocoapi, so first install cocoapi)
pip install "git+https://github.com/kemaloksuz/LRP-Error.git#subdirectory=pycocotools"
pip install "git+https://github.com/kemaloksuz/LRP-Error.git#subdirectory=lvis-api"

Using Demo Files

To facilitate the usage of LRP on each supported evaluation api, we provide a demo file:

Evaluated Visual Detection Tasks and Models

We evaluate the models from the three common repositories: mmdetection [6], detectron [7], detectron [8], and our aLRP Loss implementation [9, 10].

You can see some examples of the evaluated models under each task. Additionally, please see corresponding file of the task for more results including link to configuration files from the utilized repositories, used models, detection files from these models in json format and the result files including LRP Errors, which are generated by this repository. In each separate file, the results are presented in the following form:

MethodBackboneEpochLink to ConfigModelDetectionsLRP ResultsoLRPoLRP<sub>Loc</sub>oLRP<sub>FP</sub>oLRP<sub>FN</sub>AP<sup>C</sup>AP<sub>50</sub>AP<sub>75</sub>AR<sup>C</sup><sub>100</sub>
SSD-300VGG-16120mmdetectionmodeljsontxt78.420.637.157.925.643.826.337.5

Following the same structure, you can also make a pull request to include your results in the corresponding table.

Evaluated Object Detection Models

Some example LRP results of the models for object detection task:

MethodBackboneEpochoLRP↓oLRP<sub>Loc</sub>oLRP<sub>FP</sub>oLRP<sub>FN</sub>AP<sup>C</sup>AP<sub>50</sub>AP<sub>75</sub>
ATSSR501268.615.430.346.639.457.642.8
Faster R-CNNR1011267.617.224.244.339.461.243.4
NAS-FPNR505066.714.826.646.340.558.443.1
FreeAnchorR501266.015.226.444.541.961.045.0
Cascade R-CNNX1011263.214.423.940.944.763.648.9
aLRP LossX10110062.515.123.239.545.466.648.0

Please see object_detection.md for more and detailed results.

Evaluated Keypoint Detection Models

Some example LRP results of the models for keypoint detection task:

MethodBackboneEpochoLRP↓oLRP<sub>Loc</sub>oLRP<sub>FP</sub>oLRP<sub>FN</sub>AP<sup>C</sup>AP<sub>50</sub>AP<sub>75</sub>
Keypoint R-CNNR501244.812.810.818.664.086.469.3
Keypoint R-CNNX1011241.911.78.818.166.087.372.2

Please see keypoint_detection.md for more and detailed results.

Evaluated Instance Segmentation Models

Some example LRP results of the models for instance segmentation task:

MethodBackboneEpochoLRP↓oLRP<sub>Loc</sub>oLRP<sub>FP</sub>oLRP<sub>FN</sub>AP<sup>C</sup>AP<sub>50</sub>AP<sub>75</sub>
Mask R-CNNX1011267.818.324.943.538.460.641.3
Mask Scoring R-CNNX1011267.517.924.543.339.560.542.6
Hybrid Task CascadeX1012063.617.023.437.943.866.847.1

Please see instance_segmentation.md for more and detailed results.

Evaluated Panoptic Segmentation Models

Some example LRP results of the models for panoptic segmentation task:

MethodBackboneEpochLRP↓LRP<sub>Loc</sub>LRP<sub>FP</sub>LRP<sub>FN</sub>PQ↑SQ↑RQ↑
Panoptic FPNR501277.522.240.257.239.477.848.3
Panoptic FPNR1013775.920.338.655.241.579.150.5
Panoptic FPNR1013774.619.437.053.643.080.052.1

Please see panoptic_segmentation.md for more and detailed results.

License

This project is released under the Apache 2.0 license. Please see also the licences of each api provided under each directory.

References

[1] cocoapi of COCO dataset.
[2] panopticapi of COCO dataset.
[3] lvisapi of LVIS dataset. [4] cocoapi of mmdetection.
[5] Oksuz K, Cam BC, Akbas E, Kalkan S, Localization recall precision (LRP): A new performance metric for object detection, ECCV 2018.
[6] mmdetection.
[7] detectron.
[8] detectron2.
[9] aLRP Loss Ablation Experiments.
[10] Oksuz K, Cam BC, Akbas E, Kalkan S, A Ranking-based, Balanced Loss Function Unifying Classification and Localisation in Object Detection, NeurIPS 2020.

Contact

This repo is maintained by Kemal Oksuz and Baris Can Cam.